mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
LibJS: Throw exception if LHS of assignment is of unexpected type
This commit is contained in:
committed by
Andreas Kling
parent
2315f789cc
commit
56474bab15
@@ -711,7 +711,7 @@ Value AssignmentExpression::execute(Interpreter& interpreter) const
|
||||
object->put(property_name, rhs_result);
|
||||
}
|
||||
} else {
|
||||
ASSERT_NOT_REACHED();
|
||||
return interpreter.throw_exception<Error>("ReferenceError", "Invalid left-hand side in assignment");
|
||||
}
|
||||
|
||||
return rhs_result;
|
||||
|
||||
Reference in New Issue
Block a user