[fix] Only merge actual objects, not null values. Fixes #150.

This commit is contained in:
indexzero 2015-09-20 01:02:59 -07:00
parent a3589fab95
commit 4b5030dbc2

View file

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