From db1236b336c6d8b2a1cb5c79a635c26ae018ec8d Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Tue, 15 Mar 2022 01:49:13 +0000 Subject: [PATCH] LibJS/Bytecode: Fix typo in object binding an entry with no alias In object binding, we would attempt to get NonnullRefPtr from alias on the alias.has() code path. In this case, we need to get it from name instead. --- Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp index 03c4fc0900..8860a00ef1 100644 --- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp +++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp @@ -979,7 +979,7 @@ static Bytecode::CodeGenerationErrorOr generate_object_binding_pattern_byt }; } - auto& identifier = alias.get>()->string(); + auto& identifier = name.get>()->string(); generator.emit(generator.intern_identifier(identifier), initialization_mode); } else { auto& identifier = alias.get>()->string();