Ensure baseGet returns undefined and not null. [closes #1136]

This commit is contained in:
jdalton
2015-04-16 20:07:48 -07:00
parent 30f28a51ca
commit 9f3f0a76aa
2 changed files with 3 additions and 3 deletions

View File

@@ -2305,9 +2305,9 @@
length = path.length;
while (object != null && ++index < length) {
var result = object = toObject(object)[path[index]];
object = toObject(object)[path[index]];
}
return result;
return (index && index == length) ? object : undefined;
}
/**