File tree 1 file changed +2
-4
lines changed
packages/runtime-dom/src/modules
1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,7 @@ interface Invoker extends EventListener {
10
10
attached : number
11
11
}
12
12
13
- type EventValue = ( Function | Function [ ] ) & {
14
- invoker ?: Invoker | null
15
- }
13
+ type EventValue = Function | Function [ ]
16
14
17
15
// Async edge case fix requires storing an event listener's attach timestamp.
18
16
let _getNow : ( ) => number = Date . now
@@ -70,11 +68,11 @@ export function patchEvent(
70
68
const existingInvoker = invokers [ rawName ]
71
69
if ( nextValue && existingInvoker ) {
72
70
// patch
73
- ; ( prevValue as EventValue ) . invoker = null
74
71
existingInvoker . value = nextValue
75
72
} else {
76
73
const [ name , options ] = parseName ( rawName )
77
74
if ( nextValue ) {
75
+ // add
78
76
const invoker = ( invokers [ rawName ] = createInvoker ( nextValue , instance ) )
79
77
addEventListener ( el , name , invoker , options )
80
78
} else if ( existingInvoker ) {
You can’t perform that action at this time.
0 commit comments