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

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 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) => {
return Object.assign(
{
@@ -345,7 +352,10 @@ class AuthorList extends BaseList {
if (authors.length > 1 || item.count > this.maxItemCount)
this.getAuthorBooks(item);//no await
else
await this.getAuthorBooks(item);
if (await this.getAuthorBooks(item) === false) {
this.tableData = [];
return;
}
}
result.push(item);