From 78f385c8f60b2abd8cf6d72951c298b6186a17ae Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 30 Dec 2017 12:06:45 +0100 Subject: [PATCH] Better array current test --- Utils/ArrayUtils.js | 2 +- Utils/oLib.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Utils/ArrayUtils.js b/Utils/ArrayUtils.js index 32c4eaa..690e409 100644 --- a/Utils/ArrayUtils.js +++ b/Utils/ArrayUtils.js @@ -35,7 +35,7 @@ continue; } - if(current === null) { + if (typeof current === 'undefined' || !current.hasOwnProperty(pathParts[key])) { return null; } diff --git a/Utils/oLib.js b/Utils/oLib.js index 21dbc87..423c7a8 100644 --- a/Utils/oLib.js +++ b/Utils/oLib.js @@ -35,7 +35,7 @@ continue; } - if(current === null) { + if(typeof current === 'undefined' || !current.hasOwnProperty(pathParts[key])) { return null; }