parent
aec2b4eb46
commit
bb57c497d3
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ Memory.prototype.get = function (key) {
|
|||
//
|
||||
while (path.length > 0) {
|
||||
key = path.shift();
|
||||
if (target && typeof target !== 'string' && key in target) {
|
||||
if (target && target.hasOwnProperty(key)) {
|
||||
target = target[key];
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ vows.describe('nconf/stores/memory').addBatch({
|
|||
assert.equal(store.get('falsy:string:empty:not:exist'), undefined);
|
||||
}, TypeError);
|
||||
},
|
||||
"within empty strings": function (store) {
|
||||
"within non-empty strings": function (store) {
|
||||
assert.doesNotThrow(function() {
|
||||
assert.equal(store.get('falsy:string:value:not:exist'), undefined);
|
||||
}, TypeError);
|
||||
|
@ -105,4 +105,4 @@ vows.describe('nconf/stores/memory').addBatch({
|
|||
}
|
||||
}
|
||||
}
|
||||
}).export(module);
|
||||
}).export(module);
|
||||
|
|
Loading…
Reference in a new issue