From 0baf4ee083e3159f4306bf7fd0e3d9c06c4764ff Mon Sep 17 00:00:00 2001 From: Welkin Wong Date: Wed, 14 May 2025 16:30:07 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20hasOwn=20function=20implem?= =?UTF-8?q?entation=20to=20ensure=20proper=20property=20checking?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/util.js b/lib/util.js index 0d613ed58..922350492 100644 --- a/lib/util.js +++ b/lib/util.js @@ -9,7 +9,9 @@ exports.hasKeys = function(object) { }; var hasOwn; -exports.hasOwn = hasOwn = Object.hasOwn || Object.prototype.hasOwnProperty.call; +exports.hasOwn = hasOwn = Object.hasOwn || function(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +}; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger#Polyfill exports.isInteger = Number.isInteger || function(value) {