diff --git a/lib/nconf/stores/memory.js b/lib/nconf/stores/memory.js index db713870..6220438c 100644 --- a/lib/nconf/stores/memory.js +++ b/lib/nconf/stores/memory.js @@ -44,7 +44,7 @@ Memory.prototype.get = function (key) { // while (path.length > 0) { key = path.shift(); - if (target && target.hasOwnProperty(key)) { + if (target && typeof target !== 'string' && Object.hasOwnProperty.call(target, key)) { target = target[key]; continue; }