Поправка мелкого бага

This commit is contained in:
Book Pauk
2022-11-12 23:56:50 +07:00
parent d588b16885
commit 891b1e4fe8

View File

@@ -238,6 +238,13 @@ class AuthorList extends BaseList {
const booksToFilter = await this.loadAuthorBooks(item.key); const booksToFilter = await this.loadAuthorBooks(item.key);
const filtered = this.filterBooks(booksToFilter); const filtered = this.filterBooks(booksToFilter);
if (!filtered.length && this.list.totalFound == 1) {
this.list.queryFound = 0;
this.list.totalFound = 0;
this.searchResult.found = [];
return false;
}
const prepareBook = (book) => { const prepareBook = (book) => {
return Object.assign( return Object.assign(
{ {
@@ -345,7 +352,10 @@ class AuthorList extends BaseList {
if (authors.length > 1 || item.count > this.maxItemCount) if (authors.length > 1 || item.count > this.maxItemCount)
this.getAuthorBooks(item);//no await this.getAuthorBooks(item);//no await
else else
await this.getAuthorBooks(item); if (await this.getAuthorBooks(item) === false) {
this.tableData = [];
return;
}
} }
result.push(item); result.push(item);