From: Evan You Date: Mon, 3 Aug 2020 22:01:07 +0000 (-0400) Subject: chore: fix tests X-Git-Tag: v3.0.0-rc.6~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11ed2103919af46b5d9f573d3fad749ca7eb73f5;p=thirdparty%2Fvuejs%2Fcore.git chore: fix tests --- diff --git a/packages/runtime-dom/src/modules/events.ts b/packages/runtime-dom/src/modules/events.ts index 4b1e1aa7f2..3c3335a536 100644 --- a/packages/runtime-dom/src/modules/events.ts +++ b/packages/runtime-dom/src/modules/events.ts @@ -10,9 +10,7 @@ interface Invoker extends EventListener { attached: number } -type EventValue = (Function | Function[]) & { - invoker?: Invoker | null -} +type EventValue = Function | Function[] // Async edge case fix requires storing an event listener's attach timestamp. let _getNow: () => number = Date.now @@ -70,11 +68,11 @@ export function patchEvent( const existingInvoker = invokers[rawName] if (nextValue && existingInvoker) { // patch - ;(prevValue as EventValue).invoker = null existingInvoker.value = nextValue } else { const [name, options] = parseName(rawName) if (nextValue) { + // add const invoker = (invokers[rawName] = createInvoker(nextValue, instance)) addEventListener(el, name, invoker, options) } else if (existingInvoker) {