Browse Source

fix: `ids` may be absent or a string

tophf 1 month ago
parent
commit
b1d46474d4
1 changed files with 4 additions and 2 deletions
  1. 4 2
      src/background/utils/preinject.js

+ 4 - 2
src/background/utils/preinject.js

@@ -222,8 +222,10 @@ addPublicCommands({
     const hasIds = +ids?.[0];
     setBadge(ids, reset, src);
     if (isTop === 3) {
-      if (hasIds) reifyValueOpener(ids, docId);
-      if (ids.length) updateVisitedTime(ids, true);
+      if (hasIds) {
+        reifyValueOpener(ids, docId);
+        updateVisitedTime(ids, true);
+      }
       reifyRequests(tabId, docId);
       clearNotifications(tabId);
     }