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

master
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);
// 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;
}

View File

@ -6,6 +6,7 @@
*/
exports.data = {
isNull: null,
literal: 'bazz',
arr: ['one', 2, true, { value: 'foo' }],
obj: {