File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/vue-primitives/src/shared Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ export function composeEventHandlers<E extends Event>(
44 { checkForDefaultPrevented = true } = { } ,
55) {
66 return function handleEvent ( event : E ) {
7- const currentTarget = event . currentTarget as HTMLButtonElement
8- if ( currentTarget . disabled || currentTarget . hasAttribute ( 'data-disabled' ) ) {
7+ const currentTarget = event . currentTarget as HTMLButtonElement | null
8+ if ( currentTarget && ( currentTarget . disabled || currentTarget . hasAttribute ( 'data-disabled' ) ) ) {
99 return
1010 }
1111
12- const target = event . target as HTMLButtonElement
13- if ( target . disabled || target . hasAttribute ( 'data-disabled' ) ) {
12+ const target = event . target as HTMLButtonElement | null
13+ if ( target && ( target . disabled || target . hasAttribute ( 'data-disabled' ) ) ) {
1414 return
1515 }
1616
You can’t perform that action at this time.
0 commit comments