From 5d89343d9898955d52bd80735a6d918bcaccdba5 Mon Sep 17 00:00:00 2001 From: dfahlander Date: Mon, 12 Feb 2024 18:20:38 +0100 Subject: [PATCH] Resolve #1883: Exception when having nested index and inserting null value of nested parent. --- src/functions/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/functions/utils.ts b/src/functions/utils.ts index e1fb39883..2a7a472fe 100644 --- a/src/functions/utils.ts +++ b/src/functions/utils.ts @@ -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; }