diff --git a/Userland/Libraries/LibJS/Runtime/VM.cpp b/Userland/Libraries/LibJS/Runtime/VM.cpp index 48877aa0a1..68d9e28c49 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.cpp +++ b/Userland/Libraries/LibJS/Runtime/VM.cpp @@ -400,9 +400,9 @@ Reference VM::resolve_binding(GlobalObject& global_object, FlyString const& name for (auto* environment = lexical_environment(); environment && environment->outer_environment(); environment = environment->outer_environment()) { auto possible_match = environment->get_from_environment(name); if (possible_match.has_value()) - return Reference { *environment, name }; + return Reference { *environment, name, in_strict_mode() }; } - return Reference { global_object.environment(), name }; + return Reference { global_object.environment(), name, in_strict_mode() }; } Value VM::construct(FunctionObject& function, FunctionObject& new_target, Optional arguments)