summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp b/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp
index 62ebfb403c..d130d8a8e7 100644
--- a/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp
+++ b/Userland/Libraries/LibJS/Runtime/FunctionEnvironment.cpp
@@ -33,9 +33,9 @@ Value FunctionEnvironment::get_super_base() const
{
VERIFY(m_function_object);
auto home_object = m_function_object->home_object();
- if (home_object.is_undefined())
+ if (!home_object)
return js_undefined();
- return home_object.as_object().internal_get_prototype_of();
+ return home_object->internal_get_prototype_of();
}
// 9.1.1.3.2 HasThisBinding ( ), https://tc39.es/ecma262/#sec-function-environment-records-hasthisbinding
@@ -51,7 +51,7 @@ bool FunctionEnvironment::has_super_binding() const
{
if (this_binding_status() == ThisBindingStatus::Lexical)
return false;
- if (function_object().home_object().is_undefined())
+ if (!function_object().home_object())
return false;
return true;
}