diff options
Diffstat (limited to 'Libraries/LibJS/Runtime/MathObject.cpp')
-rw-r--r-- | Libraries/LibJS/Runtime/MathObject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibJS/Runtime/MathObject.cpp b/Libraries/LibJS/Runtime/MathObject.cpp index 611a556a6c..225d2005b3 100644 --- a/Libraries/LibJS/Runtime/MathObject.cpp +++ b/Libraries/LibJS/Runtime/MathObject.cpp @@ -53,10 +53,10 @@ MathObject::~MathObject() Value MathObject::abs(Interpreter& interpreter) { - if (interpreter.call_frame().arguments.is_empty()) + if (!interpreter.argument_count()) return js_nan(); - auto number = interpreter.call_frame().arguments[0].to_number(); + auto number = interpreter.argument(0).to_number(); if (number.is_nan()) return js_nan(); return Value(number.as_double() >= 0 ? number.as_double() : -number.as_double()); |