diff options
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Reference.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Reference.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Reference.cpp b/Userland/Libraries/LibJS/Runtime/Reference.cpp index bb892d36ae..8986511909 100644 --- a/Userland/Libraries/LibJS/Runtime/Reference.cpp +++ b/Userland/Libraries/LibJS/Runtime/Reference.cpp @@ -65,10 +65,15 @@ ThrowCompletionOr<Value> Reference::get_value(GlobalObject& global_object) const if (is_property_reference()) { auto* base_obj = TRY(m_base_value.to_object(global_object)); - if (is_private_reference()) + if (is_private_reference()) { + // FIXME: We need to be able to specify the receiver for this + // if we want to use it in error messages in future + // as things currently stand this does the "wrong thing" but + // the error is unobservable return base_obj->private_get(m_private_name); + } - return base_obj->get(m_name); + return base_obj->internal_get(m_name, m_base_value); } VERIFY(m_base_type == BaseType::Environment); |