Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Merge pull request #130 from applandinc/fix/dont-traverse-null
Browse files Browse the repository at this point in the history
fix: Don't traverse a null property value
  • Loading branch information
kgilpin authored Apr 27, 2022
2 parents bdfbb5b + eab7ca4 commit 0e4a9bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/database/visit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function visitNode(node: any, callbacks?: Record<string, Callback>): 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
Expand Down

0 comments on commit 0e4a9bf

Please sign in to comment.