From eab7ca4fd18c5473656d4cf473638ec125612832 Mon Sep 17 00:00:00 2001 From: Kevin Gilpin Date: Wed, 27 Apr 2022 11:34:09 -0400 Subject: [PATCH] fix: Don't traverse a null property value --- src/database/visit.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/visit.ts b/src/database/visit.ts index 0ce4a1d..13ff1f2 100644 --- a/src/database/visit.ts +++ b/src/database/visit.ts @@ -13,7 +13,7 @@ function visitNode(node: any, callbacks?: Record): void { if (['type', 'variant', 'name', 'value'].includes(key)) continue; if (Array.isArray(property)) { for (const subNode of property) visit(subNode, callbacks); - } else if (typeof property === 'object') { + } else if (typeof property === 'object' && property !== null) { visit(property, callbacks); } else if (typeof property === 'string' || typeof property === 'boolean') { // pass