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

LibJS: Convert to_numeric() to ThrowCompletionOr

This commit is contained in:
Idan Horowitz 2021-10-16 21:42:32 +03:00 committed by Linus Groh
parent e35222a76e
commit b8f101888b
5 changed files with 44 additions and 98 deletions

View file

@ -2055,9 +2055,7 @@ Value UpdateExpression::execute(Interpreter& interpreter, GlobalObject& global_o
auto old_value = reference.get_value(global_object);
if (interpreter.exception())
return {};
old_value = old_value.to_numeric(global_object);
if (interpreter.exception())
return {};
old_value = TRY_OR_DISCARD(old_value.to_numeric(global_object));
Value new_value;
switch (m_op) {