diff --git a/src/bun.js/bindings/webcore/JSEventEmitter.cpp b/src/bun.js/bindings/webcore/JSEventEmitter.cpp index 0d9b2a797b..5766d02f59 100644 --- a/src/bun.js/bindings/webcore/JSEventEmitter.cpp +++ b/src/bun.js/bindings/webcore/JSEventEmitter.cpp @@ -148,7 +148,7 @@ template<> JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSEventEmitterDOMConstru if constexpr (IsExceptionOr) { RETURN_IF_EXCEPTION(throwScope, {}); } - Structure* structure = JSEventEmitter::createStructure(vm, lexicalGlobalObject, jsValue); + Structure* structure = getDOMStructure(vm, globalObject) JSEventEmitter* instance = JSEventEmitter::create(structure, reinterpret_cast(lexicalGlobalObject), object.copyRef()); RETURN_IF_EXCEPTION(throwScope, {}); RELEASE_AND_RETURN(throwScope, JSValue::encode(instance));