浏览代码

fix: reset script.config.removed when installed

Gerald 8 年之前
父节点
当前提交
51b0f39976
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/background/utils/db.js

+ 3 - 1
src/background/utils/db.js

@@ -553,7 +553,9 @@ export function parseScript(data) {
       result.cmd = 'AddScript';
       result.data.update.message = i18n('msgInstalled');
     }
-    script.config = Object.assign({}, script.config, config);
+    script.config = Object.assign({}, script.config, config, {
+      removed: 0, // force reset `removed` since this is an installation
+    });
     script.custom = Object.assign({}, script.custom, custom);
     script.meta = meta;
     if (!meta.homepageURL && !script.custom.homepageURL && isRemote(data.from)) {