diff --git a/src/runtime/internal/lifecycle.ts b/src/runtime/internal/lifecycle.ts index 0ca3e4306d..d5938874fc 100644 --- a/src/runtime/internal/lifecycle.ts +++ b/src/runtime/internal/lifecycle.ts @@ -28,7 +28,7 @@ export function onDestroy(fn) { } export function createEventDispatcher() { - const component = current_component; + const component = get_current_component(); return (type, detail) => { const callbacks = component.$$.callbacks[type];