diff --git a/Utils/ArrayUtils.js b/Utils/ArrayUtils.js index 70dff9b..efb09e0 100644 --- a/Utils/ArrayUtils.js +++ b/Utils/ArrayUtils.js @@ -31,6 +31,10 @@ let current = data; for(let key in pathParts) { + if(current === null) { + return null; + } + current = current[key]; } diff --git a/Utils/oLib.js b/Utils/oLib.js index 8af71fa..12ffad0 100644 --- a/Utils/oLib.js +++ b/Utils/oLib.js @@ -31,6 +31,10 @@ let current = data; for(let key in pathParts) { + if(current === null) { + return null; + } + current = current[pathParts[key]]; }