Merge pull request #61 from flatiron/merge-null
[fix] null values should merge properly instead of throwing errors
This commit is contained in:
commit
f9b24f1aa6
2 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
1
test/fixtures/data.js
vendored
1
test/fixtures/data.js
vendored
|
@ -6,6 +6,7 @@
|
|||
*/
|
||||
|
||||
exports.data = {
|
||||
isNull: null,
|
||||
literal: 'bazz',
|
||||
arr: ['one', 2, true, { value: 'foo' }],
|
||||
obj: {
|
||||
|
|
Loading…
Reference in a new issue