fix(ext/node): fix deepStrictEqual(-0, 0) (#29060)

This commit is contained in:
Yoshiya Hinosawa 2025-04-27 22:19:36 +09:00 committed by GitHub
parent 733ffd9dd9
commit 84b192ee5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 9 additions and 1 deletions

View file

@ -103,7 +103,7 @@ export function equal(c: unknown, d: unknown): boolean {
return aTime === bTime;
}
if (typeof a === "number" && typeof b === "number") {
return NumberIsNaN(a) && NumberIsNaN(b) || a === b;
return ObjectIs(a, b);
}
if (ObjectIs(a, b)) {
return true;