Browse Source

Дополнение в convertRecent

Book Pauk 3 years ago
parent
commit
1b4360b897
1 changed files with 2 additions and 1 deletions
  1. 2 1
      client/components/Reader/share/bookManager.js

+ 2 - 1
client/components/Reader/share/bookManager.js

@@ -81,13 +81,14 @@ class BookManager {
 
 
         for (const key in this.recent) {
         for (const key in this.recent) {
             const book = this.recent[key];
             const book = this.recent[key];
+
             if (!book.path) {
             if (!book.path) {
                 continue;
                 continue;
             }
             }
 
 
             const newKey = this.keyFromPath(book.path);
             const newKey = this.keyFromPath(book.path);
 
 
-            if (!book.deleted && key !== newKey) {
+            if (!book.deleted && key !== newKey || book.key !== newKey) {
                 this.recent[newKey] = _.cloneDeep(book);
                 this.recent[newKey] = _.cloneDeep(book);
                 this.recent[newKey].key = newKey;
                 this.recent[newKey].key = newKey;
                 book.deleted = 1;
                 book.deleted = 1;