1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:27:35 +00:00

LibJS: The global isNaN() should coerce to number before testing NaN

For stricter NaN checking, we'll have to implement Number.isNaN().
This commit is contained in:
Andreas Kling 2020-03-27 12:59:41 +01:00
parent c60dc84a33
commit 6a5cd32205
2 changed files with 2 additions and 2 deletions

View file

@ -5,7 +5,7 @@ try {
assert(nan + "" == "NaN");
assert(isNaN(nan) === true);
assert(isNaN(0) === false);
assert(isNaN(undefined) === false);
assert(isNaN(undefined) === true);
assert(isNaN(null) === false);
console.log("PASS");
} catch (e) {