Browse Source

fix: use "notify updates" option for errors too (#1232)

tophf 5 years ago
parent
commit
dd37570ff1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/background/utils/update.js

+ 2 - 2
src/background/utils/update.js

@@ -60,7 +60,7 @@ async function doCheckUpdate(script, notes) {
       code: await downloadUpdate(script),
       update: { checking: false },
     });
-    msgOk = canNotify(script) && i18n('msgScriptUpdated', [getName(update)]);
+    msgOk = i18n('msgScriptUpdated', [getName(update)]);
     resourceOpts = { headers: NO_HTTP_CACHE };
     return true;
   } catch (update) {
@@ -73,7 +73,7 @@ async function doCheckUpdate(script, notes) {
       msgErr = await fetchResources(script, null, resourceOpts);
       if (process.env.DEBUG && msgErr) console.error(msgErr);
     }
-    if (msgOk || msgErr) {
+    if (canNotify(script) && (msgOk || msgErr)) {
       notes.push({
         script,
         text: [msgOk, msgErr]::trueJoin('\n'),