Przeglądaj źródła

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

Book Pauk 5 lat temu
rodzic
commit
d505fd0795
1 zmienionych plików z 2 dodań i 1 usunięć
  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) {
     async bookManagerEvent(eventName) {
         if (eventName == 'set-recent' || eventName == 'recent-deleted') {
         if (eventName == 'set-recent' || eventName == 'recent-deleted') {
             const oldBook = (this.textPage ? this.textPage.lastBook : null);
             const oldBook = (this.textPage ? this.textPage.lastBook : null);
+            const oldPos = (this.textPage ? this.textPage.bookPos : null);
             const newBook = bookManager.mostRecentBook();
             const newBook = bookManager.mostRecentBook();
 
 
             if (!(oldBook && newBook && oldBook.key == newBook.key)) {
             if (!(oldBook && newBook && oldBook.key == newBook.key)) {
@@ -526,7 +527,7 @@ class Reader extends Vue {
                     } finally {
                     } finally {
                         this.loadingBook = false;
                         this.loadingBook = false;
                     }
                     }
-                } else if (oldBook.bookPos != newBook.bookPos) {
+                } else if (oldPos != newBook.bookPos) {
                     while (this.loadingBook) await utils.sleep(100);
                     while (this.loadingBook) await utils.sleep(100);
                     this.bookPosChanged({bookPos: newBook.bookPos});
                     this.bookPosChanged({bookPos: newBook.bookPos});
                 }
                 }