瀏覽代碼

fix: Model being removed with 1 remaining usage

Owen Diffey 3 周之前
父節點
當前提交
fb265e5264
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      frontend/src/stores/model.ts

+ 1 - 1
frontend/src/stores/model.ts

@@ -254,7 +254,7 @@ export const useModelStore = defineStore("model", () => {
 
 			model.removeUse();
 
-			if (model.getUses() > 1) return;
+			if (model.getUses() > 0) return;
 
 			// TODO only do this after a grace period
 			removeModels.push(model);