diff --git a/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp index 9f6b879513..5b6da08c72 100644 --- a/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/ErrorConstructor.cpp @@ -64,7 +64,7 @@ ThrowCompletionOr ErrorConstructor::construct(FunctionObject& new_targe #define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName, ArrayType) \ ConstructorName::ConstructorName(GlobalObject& global_object) \ - : NativeFunction(*static_cast(global_object.error_constructor())) \ + : NativeFunction(vm().names.ClassName.as_string(), *static_cast(global_object.error_constructor())) \ { \ } \ \