Browse Source

Fix option logic to accept null

pull/127/head
Masayuki Tanaka 11 years ago
parent
commit
0ff7afe357
  1. 2
      c3.js
  2. 2
      c3.min.js

2
c3.js

@ -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;

2
c3.min.js vendored

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save