summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Value.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Value.cpp b/Userland/Libraries/LibJS/Runtime/Value.cpp
index a31d56e412..99e99b1bda 100644
--- a/Userland/Libraries/LibJS/Runtime/Value.cpp
+++ b/Userland/Libraries/LibJS/Runtime/Value.cpp
@@ -242,7 +242,9 @@ bool Value::is_constructor() const
return false;
if (is<NativeFunction>(as_object()))
return static_cast<const NativeFunction&>(as_object()).has_constructor();
- // OrdinaryFunctionObject or BoundFunction
+ if (is<BoundFunction>(as_object()))
+ return Value(&static_cast<const BoundFunction&>(as_object()).target_function()).is_constructor();
+ // OrdinaryFunctionObject
return true;
}