Fix undefined current

This commit is contained in:
Dennis Eichhorn 2017-10-24 18:13:34 +02:00
parent c8fbc69f94
commit 14b668f54c
2 changed files with 8 additions and 0 deletions

View File

@ -31,6 +31,10 @@
let current = data;
for(let key in pathParts) {
if(current === null) {
return null;
}
current = current[key];
}

View File

@ -31,6 +31,10 @@
let current = data;
for(let key in pathParts) {
if(current === null) {
return null;
}
current = current[pathParts[key]];
}