From df3ad7b00d56c9faf7a01686feabbb1724aed141 Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Tue, 23 Aug 2022 16:46:40 +0530 Subject: [PATCH] fix: set default 0 in reduce --- src/utils/search.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/search.ts b/src/utils/search.ts index 6a9eb19d..3f99bc69 100644 --- a/src/utils/search.ts +++ b/src/utils/search.ts @@ -418,7 +418,7 @@ export class Search { const totalChildKeywords = Object.values(this.searchables) .filter((s) => s.isChild) .map((s) => this.keywords[s.schemaName]?.length ?? 0) - .reduce((a, b) => a + b); + .reduce((a, b) => a + b, 0); if (totalChildKeywords > 2_000) { this.set('skipTables', true);