[fix] null values should merge properly instead of throwing errors
This commit is contained in:
parent
7421836387
commit
da39d3cac3
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);
|
response = store[action].apply(store, args);
|
||||||
|
|
||||||
// Merge objects if necessary
|
// 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);
|
mergeObjs.push(response);
|
||||||
response = undefined;
|
response = undefined;
|
||||||
}
|
}
|
||||||
|
|
1
test/fixtures/data.js
vendored
1
test/fixtures/data.js
vendored
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
exports.data = {
|
exports.data = {
|
||||||
|
isNull: null,
|
||||||
literal: 'bazz',
|
literal: 'bazz',
|
||||||
arr: ['one', 2, true, { value: 'foo' }],
|
arr: ['one', 2, true, { value: 'foo' }],
|
||||||
obj: {
|
obj: {
|
||||||
|
|
Loading…
Reference in a new issue