summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/GlobalObject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibJS/Runtime/GlobalObject.cpp')
-rw-r--r--Libraries/LibJS/Runtime/GlobalObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibJS/Runtime/GlobalObject.cpp b/Libraries/LibJS/Runtime/GlobalObject.cpp
index c1a344df30..b45fb867ca 100644
--- a/Libraries/LibJS/Runtime/GlobalObject.cpp
+++ b/Libraries/LibJS/Runtime/GlobalObject.cpp
@@ -21,7 +21,7 @@ GlobalObject::GlobalObject()
put_native_function("isNaN", [](Object*, Vector<Value> arguments) -> Value {
if (arguments.size() < 1)
return js_undefined();
- return Value(arguments[0].is_nan());
+ return Value(arguments[0].to_number().is_nan());
});
put("Math", heap().allocate<MathObject>());
}