aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/util/SearchUtil.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/util/SearchUtil.ts b/src/client/util/SearchUtil.ts
index 17c4af9d1..2f23d07dc 100644
--- a/src/client/util/SearchUtil.ts
+++ b/src/client/util/SearchUtil.ts
@@ -59,9 +59,9 @@ export namespace SearchUtil {
* An array of all field names used by the Doc or its prototypes.
*/
export function documentKeys(doc: Doc) {
- return Object.keys(Doc.GetAllPrototypes(doc).reduce(
+ return Object.keys(Doc.GetAllPrototypes(doc).filter(proto => proto).reduce(
(keys, proto) => {
- Object.keys(proto).forEach(keys.add);
+ Object.keys(proto).forEach(keys.add.bind(keys));
return keys;
},
new Set<string>())); // prettier-ignore