diff --git a/lib/nconf/provider.js b/lib/nconf/provider.js index e83c3c6..413df5f 100644 --- a/lib/nconf/provider.js +++ b/lib/nconf/provider.js @@ -539,7 +539,7 @@ Provider.prototype._execute = function (action, syncLength /* [arguments] */) { response = store[action].apply(store, args); // Merge objects if necessary - if (action === 'get' && typeof response === 'object' && !Array.isArray(response)) { + if (response && action === 'get' && typeof response === 'object' && !Array.isArray(response)) { mergeObjs.push(response); response = undefined; } diff --git a/test/fixtures/data.js b/test/fixtures/data.js index 604dc05..06925af 100644 --- a/test/fixtures/data.js +++ b/test/fixtures/data.js @@ -6,6 +6,7 @@ */ exports.data = { + isNull: null, literal: 'bazz', arr: ['one', 2, true, { value: 'foo' }], obj: {