diff --git a/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp index 22c019a694..ffd20b75c7 100644 --- a/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp @@ -42,7 +42,7 @@ Value ErrorConstructor::construct(Function&) #define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \ ConstructorName::ConstructorName(GlobalObject& global_object) \ - : NativeFunction(*global_object.function_prototype()) \ + : NativeFunction(*static_cast(global_object.error_constructor())) \ { \ } \ \