From f6daafce7218d0113b614b187eae76d89b30ebb1 Mon Sep 17 00:00:00 2001 From: Bastien Chamagne Date: Tue, 22 Jun 2021 10:55:41 +0200 Subject: [PATCH] fix: typeof instead of instanceof to check for object --- src/core/helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/helper.js b/src/core/helper.js index dbdc8bb5..a9823a65 100644 --- a/src/core/helper.js +++ b/src/core/helper.js @@ -37,7 +37,7 @@ function equals(obj1, obj2) { for (let ai = 0; ai < v1.length; ai += 1) { if (!equals(v1[ai], v2[ai])) return false; } - } else if (typeof v1 !== 'function' && !Array.isArray(v1) && v1 instanceof Object) { + } else if (typeof v1 !== 'function' && !Array.isArray(v1) && typeof v1 === 'object' && v1 !== null) { if (!equals(v1, v2)) return false; } }