mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 17:10:23 +00:00
LibJS: Do not consider un-labeled Block scopes as breakable
This commit is contained in:
parent
8e89233bba
commit
a2113909c3
Notes:
sideshowbarker
2024-07-19 03:04:05 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/a2113909c31 Pull-request: https://github.com/SerenityOS/serenity/pull/3334 Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ Value Interpreter::run(GlobalObject& global_object, const Statement& statement,
|
|||
for (auto& node : block.children()) {
|
||||
m_last_value = node.execute(*this, global_object);
|
||||
if (should_unwind()) {
|
||||
if (should_unwind_until(ScopeType::Breakable, block.label()))
|
||||
if (!block.label().is_null() && should_unwind_until(ScopeType::Breakable, block.label()))
|
||||
stop_unwind();
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue