Skip to content

Commit

Permalink
Handle case where parsed config object hasn't prototype (#365)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilkkao committed May 21, 2021
1 parent 511e16f commit 2db6af4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nconf/stores/memory.js
Expand Up @@ -75,7 +75,7 @@ Memory.prototype.get = function (key) {
//
while (path.length > 0) {
key = path.shift();
if (target && typeof target !== 'string' && target.hasOwnProperty(key)) {
if (target && typeof target !== 'string' && Object.hasOwnProperty.call(target, key)) {
target = target[key];
continue;
}
Expand Down

0 comments on commit 2db6af4

Please sign in to comment.