From 3e5894d9e0534e6bf3c23313273f9ca54c97cbe8 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Wed, 31 Jul 2024 11:44:07 +0700 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B1=D0=B0=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/Reader/RecentBooksPage/RecentBooksPage.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue index 5ab70ca1..6c9c41f7 100644 --- a/client/components/Reader/RecentBooksPage/RecentBooksPage.vue +++ b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue @@ -594,7 +594,7 @@ class RecentBooksPage { } async handleDel(item) { - if (item.group) { + if (item.group?.length) { const keys = [{key: item.key}]; for (const book of item.group) keys.push({key: book.key}); @@ -615,14 +615,14 @@ class RecentBooksPage { } else { if (await this.$root.stdDialog.confirm('Подтвердите удаление книги из архива:', ' ')) { await bookManager.delRecentBooks([{key: item.key}], 2); - this.$root.notify.info('Книга удалено безвозвратно'); + this.$root.notify.info('Книга удалена безвозвратно'); } } } } async handleRestore(item) { - if (item.group) { + if (item.group?.length) { const keys = [{key: item.key}]; for (const book of item.group) keys.push({key: book.key}); @@ -637,7 +637,7 @@ class RecentBooksPage { async loadBook(item, force = false) { if (item.deleted) - await this.handleRestore(item.key); + await this.handleRestore(item); this.$emit('load-book', {url: item.url, path: item.path, force}); this.close();