mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
LibJS: Fix bad cast in Interpreter::run()
We were casting to BlockStatement when we should cast to ScopeNode.
This commit is contained in:
@@ -59,7 +59,7 @@ Value Interpreter::run(const Statement& statement, Vector<Argument> arguments, S
|
||||
if (!statement.is_scope_node())
|
||||
return statement.execute(*this);
|
||||
|
||||
auto& block = static_cast<const BlockStatement&>(statement);
|
||||
auto& block = static_cast<const ScopeNode&>(statement);
|
||||
enter_scope(block, move(arguments), scope_type);
|
||||
|
||||
Value last_value = js_undefined();
|
||||
|
||||
Reference in New Issue
Block a user