[fix] null values should merge properly instead of throwing errors

This commit is contained in:
Bradley Meck 2012-09-08 20:09:03 -05:00
parent 7421836387
commit da39d3cac3
2 changed files with 2 additions and 1 deletions

View file

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

View file

@ -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: {