[fix] Only merge actual objects, not null
values. Fixes #150.
This commit is contained in:
parent
a3589fab95
commit
4b5030dbc2
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue