Skip to content

Commit 11ed210

Browse files
committed
chore: fix tests
1 parent 8d4abc3 commit 11ed210

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

packages/runtime-dom/src/modules/events.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ interface Invoker extends EventListener {
1010
attached: number
1111
}
1212

13-
type EventValue = (Function | Function[]) & {
14-
invoker?: Invoker | null
15-
}
13+
type EventValue = Function | Function[]
1614

1715
// Async edge case fix requires storing an event listener's attach timestamp.
1816
let _getNow: () => number = Date.now
@@ -70,11 +68,11 @@ export function patchEvent(
7068
const existingInvoker = invokers[rawName]
7169
if (nextValue && existingInvoker) {
7270
// patch
73-
;(prevValue as EventValue).invoker = null
7471
existingInvoker.value = nextValue
7572
} else {
7673
const [name, options] = parseName(rawName)
7774
if (nextValue) {
75+
// add
7876
const invoker = (invokers[rawName] = createInvoker(nextValue, instance))
7977
addEventListener(el, name, invoker, options)
8078
} else if (existingInvoker) {

0 commit comments

Comments
 (0)