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 authored and Matt Hamann committed Jun 21, 2021
1 parent b1914ae commit dc8c3d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nconf/stores/memory.js
Expand Up @@ -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;
}
Expand Down

0 comments on commit dc8c3d6

Please sign in to comment.