mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 04:37:55 +00:00
LibJS/Bytecode: Fix typo in object binding an entry with no alias
In object binding, we would attempt to get NonnullRefPtr<Identifier> from alias on the alias.has<Empty>() code path. In this case, we need to get it from name instead.
This commit is contained in:
committed by
Ali Mohammad Pur
parent
515f3e0b85
commit
db1236b336
@@ -979,7 +979,7 @@ static Bytecode::CodeGenerationErrorOr<void> generate_object_binding_pattern_byt
|
||||
};
|
||||
}
|
||||
|
||||
auto& identifier = alias.get<NonnullRefPtr<Identifier>>()->string();
|
||||
auto& identifier = name.get<NonnullRefPtr<Identifier>>()->string();
|
||||
generator.emit<Bytecode::Op::SetVariable>(generator.intern_identifier(identifier), initialization_mode);
|
||||
} else {
|
||||
auto& identifier = alias.get<NonnullRefPtr<Identifier>>()->string();
|
||||
|
||||
Reference in New Issue
Block a user