From dc7f9f6ef64fd21d94533894036e57151a6fcee8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Fri, 6 Oct 2023 11:06:30 +0800 Subject: [PATCH] :art: database --- app/src/util/functions.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/util/functions.ts b/app/src/util/functions.ts index 3733d5225..0812607f8 100644 --- a/app/src/util/functions.ts +++ b/app/src/util/functions.ts @@ -82,6 +82,7 @@ export const looseJsonParse = (text: string) => { export const objEquals = (a: any, b: any): boolean => { if (a === b) return true; + if (typeof a === "number" && isNaN(a) && typeof b === "number" && isNaN(b)) return true; if (a instanceof Date && b instanceof Date) return a.getTime() === b.getTime(); if (!a || !b || (typeof a !== "object" && typeof b !== "object")) return a === b; if (a.prototype !== b.prototype) return false;