Merge pull request #61 from flatiron/merge-null

[fix] null values should merge properly instead of throwing errors
master
Bradley Meck 2012-09-08 18:11:54 -07:00
commit f9b24f1aa6
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: {