diff options
Diffstat (limited to 'Libraries/LibJS/Runtime/GlobalObject.cpp')
-rw-r--r-- | Libraries/LibJS/Runtime/GlobalObject.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Libraries/LibJS/Runtime/GlobalObject.cpp b/Libraries/LibJS/Runtime/GlobalObject.cpp index a0f3066629..0612da4669 100644 --- a/Libraries/LibJS/Runtime/GlobalObject.cpp +++ b/Libraries/LibJS/Runtime/GlobalObject.cpp @@ -144,8 +144,7 @@ Value GlobalObject::is_nan(Interpreter& interpreter) Value GlobalObject::is_finite(Interpreter& interpreter) { - auto value = interpreter.argument(0).to_number(); - return Value(!value.is_infinity() && !value.is_nan()); + return Value(interpreter.argument(0).to_number().is_finite_number()); } } |