浏览代码

Мелкая поправка

Book Pauk 5 年之前
父节点
当前提交
d505fd0795
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      client/components/Reader/Reader.vue

+ 2 - 1
client/components/Reader/Reader.vue

@@ -512,6 +512,7 @@ class Reader extends Vue {
     async bookManagerEvent(eventName) {
         if (eventName == 'set-recent' || eventName == 'recent-deleted') {
             const oldBook = (this.textPage ? this.textPage.lastBook : null);
+            const oldPos = (this.textPage ? this.textPage.bookPos : null);
             const newBook = bookManager.mostRecentBook();
 
             if (!(oldBook && newBook && oldBook.key == newBook.key)) {
@@ -526,7 +527,7 @@ class Reader extends Vue {
                     } finally {
                         this.loadingBook = false;
                     }
-                } else if (oldBook.bookPos != newBook.bookPos) {
+                } else if (oldPos != newBook.bookPos) {
                     while (this.loadingBook) await utils.sleep(100);
                     this.bookPosChanged({bookPos: newBook.bookPos});
                 }