Skip to content

Commit

Permalink
fix(core): check null and fail fast in getPathRecursive
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Jan 4, 2021
1 parent ee609be commit 449da22
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/lib/utils/get-path-recursive.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ export function getPathRecursive(
prefix = '',
prev: string[] = []
): string[] {
if (node == null) {
return;
}

const result = prev;

const keys = Object.getOwnPropertyNames(node);
Expand Down

0 comments on commit 449da22

Please sign in to comment.