File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,12 +63,11 @@ function handleEvent(event: Event) {
6363 const el = event . currentTarget
6464 if ( ! ( el instanceof Element ) ) return
6565 for ( const binding of bindings ( el ) ) {
66- // Dispatch only to Catalyst elements.
67- if ( event . type !== binding . type || ! controllers . has ( binding . tag ) ) continue
68- const controller = el . closest ( binding . tag ) as Element & Record < string , ( ev : Event ) => unknown >
69- if ( ! controller ) continue
70- if ( typeof controller [ binding . method ] === 'function' ) {
71- controller [ binding . method ] ( event )
66+ if ( event . type === binding . type && controllers . has ( binding . tag ) ) {
67+ const controller = el . closest ( binding . tag ) as Element & Record < string , ( ev : Event ) => unknown >
68+ if ( controller && typeof controller [ binding . method ] === 'function' ) {
69+ controller [ binding . method ] ( event )
70+ }
7271 }
7372 }
7473}
You can’t perform that action at this time.
0 commit comments