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

LibJS: Do not consider un-labeled Block scopes as breakable

This commit is contained in:
AnotherTest 2020-08-28 21:22:22 +04:30 committed by Andreas Kling
parent 8e89233bba
commit a2113909c3

View file

@ -87,7 +87,7 @@ Value Interpreter::run(GlobalObject& global_object, const Statement& statement,
for (auto& node : block.children()) { for (auto& node : block.children()) {
m_last_value = node.execute(*this, global_object); m_last_value = node.execute(*this, global_object);
if (should_unwind()) { 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(); stop_unwind();
break; break;
} }