mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibJS: Convert has_binding() to ThrowCompletionOr
Also add spec step comments to it while we're here.
This commit is contained in:
parent
617d3cd3d3
commit
fbb176c926
11 changed files with 50 additions and 29 deletions
|
@ -3190,7 +3190,7 @@ void ScopeNode::block_declaration_instantiation(GlobalObject& global_object, Env
|
|||
if (is_constant_declaration) {
|
||||
environment->create_immutable_binding(global_object, name, true);
|
||||
} else {
|
||||
if (!environment->has_binding(name))
|
||||
if (!MUST(environment->has_binding(name)))
|
||||
environment->create_mutable_binding(global_object, name, false);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue