2
0
mirror of https://github.com/frappe/books.git synced 2025-02-08 23:18:31 +00:00

fix: set default 0 in reduce

This commit is contained in:
18alantom 2022-08-23 16:46:40 +05:30
parent eadfd6f716
commit df3ad7b00d

View File

@ -418,7 +418,7 @@ export class Search {
const totalChildKeywords = Object.values(this.searchables) const totalChildKeywords = Object.values(this.searchables)
.filter((s) => s.isChild) .filter((s) => s.isChild)
.map((s) => this.keywords[s.schemaName]?.length ?? 0) .map((s) => this.keywords[s.schemaName]?.length ?? 0)
.reduce((a, b) => a + b); .reduce((a, b) => a + b, 0);
if (totalChildKeywords > 2_000) { if (totalChildKeywords > 2_000) {
this.set('skipTables', true); this.set('skipTables', true);