From a2113909c3178416bae7d9194213c41fe54dc8a7 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Fri, 28 Aug 2020 21:22:22 +0430 Subject: [PATCH] LibJS: Do not consider un-labeled Block scopes as breakable --- Libraries/LibJS/Interpreter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibJS/Interpreter.cpp b/Libraries/LibJS/Interpreter.cpp index 797e3c8541..fcb3f94284 100644 --- a/Libraries/LibJS/Interpreter.cpp +++ b/Libraries/LibJS/Interpreter.cpp @@ -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; }