mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibJS: Implement Number.isNaN()
Like the global isNaN() without the number coercion.
This commit is contained in:
parent
c350f5ae67
commit
7bd6b58b29
Notes:
sideshowbarker
2024-07-19 07:16:21 +09:00
Author: https://github.com/linusg
Commit: 7bd6b58b29
Pull-request: https://github.com/SerenityOS/serenity/pull/1973
4 changed files with 38 additions and 2 deletions
|
@ -138,8 +138,7 @@ Value GlobalObject::gc(Interpreter& interpreter)
|
|||
|
||||
Value GlobalObject::is_nan(Interpreter& interpreter)
|
||||
{
|
||||
auto value = interpreter.argument(0).to_number();
|
||||
return Value(value.is_nan());
|
||||
return Value(interpreter.argument(0).to_number().is_nan());
|
||||
}
|
||||
|
||||
Value GlobalObject::is_finite(Interpreter& interpreter)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue