Skip to content

Commit

Permalink
Resolve #1883: Exception when having nested index and inserting null …
Browse files Browse the repository at this point in the history
…value of nested parent.
  • Loading branch information
dfahlander committed Feb 12, 2024
1 parent 0e4ef3e commit 5d89343
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/functions/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export function getByKeyPath(obj, keyPath) {
var period = keyPath.indexOf('.');
if (period !== -1) {
var innerObj = obj[keyPath.substr(0, period)];
return innerObj === undefined ? undefined : getByKeyPath(innerObj, keyPath.substr(period + 1));
return innerObj == null ? undefined : getByKeyPath(innerObj, keyPath.substr(period + 1));
}
return undefined;
}
Expand Down

0 comments on commit 5d89343

Please sign in to comment.