From 383fe14ee7fed754d05976df214c5036bba810ee Mon Sep 17 00:00:00 2001 From: guybedford Date: Tue, 8 Dec 2015 23:24:09 +0200 Subject: [PATCH] allow meta objects to be nulled --- lib/proto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/proto.js b/lib/proto.js index 7331887a..5b775308 100644 --- a/lib/proto.js +++ b/lib/proto.js @@ -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;