mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 09:39:39 +00:00
LibJS: Throw exception if LHS of assignment is of unexpected type
This commit is contained in:
parent
2315f789cc
commit
56474bab15
Notes:
sideshowbarker
2024-07-19 07:45:23 +09:00
Author: https://github.com/DontBelieveMe 🔰
Commit: 56474bab15
Pull-request: https://github.com/SerenityOS/serenity/pull/1722
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue