allow meta objects to be nulled

This commit is contained in:
guybedford 2015-12-08 23:24:09 +02:00
parent b4fd674107
commit 383fe14ee7

View File

@ -101,7 +101,7 @@ function extendMeta(a, b, prepend) {
a[p] = val;
else if (val instanceof Array && a[p] instanceof Array)
a[p] = [].concat(prepend ? val : a[p]).concat(prepend ? a[p] : val);
else if (typeof val == 'object' && typeof a[p] == 'object')
else if (typeof val == 'object' && val !== null && typeof a[p] == 'object')
a[p] = extend(extend({}, a[p]), val, prepend);
else if (!prepend)
a[p] = val;