diff --git a/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Libraries/LibJS/Bytecode/ASTCodegen.cpp index c3d925465bc..b56fbbfebd9 100644 --- a/Libraries/LibJS/Bytecode/ASTCodegen.cpp +++ b/Libraries/LibJS/Bytecode/ASTCodegen.cpp @@ -1616,9 +1616,7 @@ Bytecode::CodeGenerationErrorOr> VariableDeclaration::ge } else if (m_declaration_kind != DeclarationKind::Var) { (void)TRY(assign_value_to_variable_declarator(generator, declarator, *this, generator.add_constant(js_undefined()))); } - } - for (auto& declarator : m_declarations) { if (auto const* identifier = declarator->target().get_pointer>()) { if ((*identifier)->is_local()) { generator.set_local_initialized((*identifier)->local_variable_index());