瀏覽代碼

fix ref error after cache key change

Mike L 3 年之前
父節點
當前提交
74dc953454
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      dist/twitter.js
  2. 1 1
      src/twitter.ts

+ 1 - 1
dist/twitter.js

@@ -314,7 +314,7 @@ class default_1 {
                 setTimeout(this.work, this.workInterval * 1000 / lock.feed.length);
                 return;
             }
-            const cachedFeed = this.cache[match[1]];
+            const cachedFeed = this.cache[lock.threads[currentFeed].id];
             if (!cachedFeed) {
                 setTimeout(this.work, this.workInterval * 1000 / lock.feed.length);
                 return;

+ 1 - 1
src/twitter.ts

@@ -532,7 +532,7 @@ export default class {
       logger.error(`current feed "${currentFeed}" is invalid, please remove this feed manually`);
       lock.workon++; setTimeout(this.work, this.workInterval * 1000 / lock.feed.length); return;
     }
-    const cachedFeed = this.cache[match[1]];
+    const cachedFeed = this.cache[lock.threads[currentFeed].id];
     if (!cachedFeed) {
       setTimeout(this.work, this.workInterval * 1000 / lock.feed.length); return;
     }