mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +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:
parent
515f3e0b85
commit
db1236b336
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue