summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
index 3f432ee052..0ba0eae4c9 100644
--- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
@@ -120,7 +120,7 @@ void ECMAScriptFunctionObject::initialize(GlobalObject& global_object)
break;
case FunctionKind::Generator:
// prototype is "g1.prototype" in figure-2 (https://tc39.es/ecma262/img/figure-2.png)
- prototype = global_object.generator_prototype();
+ prototype = Object::create(global_object, global_object.generator_function_prototype_prototype());
break;
case FunctionKind::Async:
break;