diff --git a/src/runtime/internal/dom.ts b/src/runtime/internal/dom.ts index 8367ab619d..69f5cc07b1 100644 --- a/src/runtime/internal/dom.ts +++ b/src/runtime/internal/dom.ts @@ -635,7 +635,7 @@ export interface CustomEventOpts { cancelable?: boolean; } -export function custom_event(type: string, detail?: T, opts?: CustomEventOpts) { +export function custom_event(type: string, detail?: T, opts: CustomEventOpts = {}) { const e: CustomEvent = document.createEvent('CustomEvent'); e.initCustomEvent(type, opts.bubbles, opts.cancelable, detail); return e;