From 329493f92a32abcad8d61f3b5fa11ca38b5c0811 Mon Sep 17 00:00:00 2001 From: Ilkka Oksanen Date: Wed, 5 May 2021 21:06:45 +0300 Subject: [PATCH] Handle case where parsed config object hasn't prototype --- lib/nconf/stores/memory.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nconf/stores/memory.js b/lib/nconf/stores/memory.js index ced5de06..34bab8a5 100644 --- a/lib/nconf/stores/memory.js +++ b/lib/nconf/stores/memory.js @@ -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; }