From 73af51ba259af911bb71547a6a527accb3a48920 Mon Sep 17 00:00:00 2001 From: mrfatolahi1 Date: Tue, 3 Jan 2023 00:19:55 +0330 Subject: [PATCH] fix type checking in objEquiv function --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 04d8371..d2adc77 100644 --- a/index.js +++ b/index.js @@ -924,6 +924,10 @@ } function objEquiv (a, b) { + // type checking + if (typeof a != typeof b){ + return false; + } if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) return false; // an identical "prototype" property.