Skip to content

Commit

Permalink
[fix] Only merge actual objects, not null values. Fixes #150.
Browse files Browse the repository at this point in the history
  • Loading branch information
indexzero committed Sep 20, 2015
1 parent a3589fa commit 4b5030d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/nconf/provider.js
Expand Up @@ -250,7 +250,7 @@ Provider.prototype.get = function (key, callback) {
response = value;

// Merge objects if necessary
if (typeof response === 'object' && !Array.isArray(response)) {
if (response && typeof response === 'object' && !Array.isArray(response)) {
mergeObjs.push(response);
response = undefined;
}
Expand All @@ -262,7 +262,7 @@ Provider.prototype.get = function (key, callback) {
response = store.get(key);

// Merge objects if necessary
if (typeof response === 'object' && !Array.isArray(response)) {
if (response && typeof response === 'object' && !Array.isArray(response)) {
mergeObjs.push(response);
response = undefined;
}
Expand Down

0 comments on commit 4b5030d

Please sign in to comment.