Commit 0ff7afe3 authored by Masayuki Tanaka's avatar Masayuki Tanaka

Fix option logic to accept null

parent b4b48ae1
......@@ -88,7 +88,7 @@
// Check next key's value
isLast = (i === keys.length - 1);
nextTarget = target[keys[i]];
if ((!isLast && typeof nextTarget !== 'object') || (isLast && typeof defaultValue !== 'object' && typeof nextTarget === 'object')) {
if ((!isLast && typeof nextTarget !== 'object') || (isLast && typeof defaultValue !== 'object' && typeof nextTarget === 'object' && nextTarget !== null)) {
return defaultValue;
}
target = nextTarget;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment