@@ -15,7 +15,10 @@ import {
1515 SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS ,
1616} from './EventSystemFlags' ;
1717import type { AnyNativeEvent } from './PluginModuleType' ;
18- import type { ReactSyntheticEvent } from './ReactSyntheticEventType' ;
18+ import type {
19+ KnownReactSyntheticEvent ,
20+ ReactSyntheticEvent ,
21+ } from './ReactSyntheticEventType' ;
1922import type { ElementListenerMapEntry } from '../client/ReactDOMComponentTree' ;
2023import type { EventPriority } from 'shared/ReactTypes' ;
2124import type { Fiber } from 'react-reconciler/src/ReactInternalTypes' ;
@@ -917,15 +920,12 @@ function getLowestCommonAncestor(instA: Fiber, instB: Fiber): Fiber | null {
917920
918921function accumulateEnterLeaveListenersForEvent (
919922 dispatchQueue : DispatchQueue ,
920- event : ReactSyntheticEvent ,
923+ event : KnownReactSyntheticEvent ,
921924 target : Fiber ,
922925 common : Fiber | null ,
923926 inCapturePhase : boolean ,
924927) : void {
925928 const registrationName = event . _reactName ;
926- if ( registrationName === null ) {
927- return ;
928- }
929929 const listeners : Array < DispatchListener > = [ ] ;
930930
931931 let instance = target ;
@@ -969,8 +969,8 @@ function accumulateEnterLeaveListenersForEvent(
969969// phase event listeners.
970970export function accumulateEnterLeaveTwoPhaseListeners (
971971 dispatchQueue : DispatchQueue ,
972- leaveEvent : ReactSyntheticEvent ,
973- enterEvent : null | ReactSyntheticEvent ,
972+ leaveEvent : KnownReactSyntheticEvent ,
973+ enterEvent : null | KnownReactSyntheticEvent ,
974974 from : Fiber | null ,
975975 to : Fiber | null ,
976976) : void {
0 commit comments