File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/react-dom/src/events Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ const topLevelEventsToDispatchConfig: {
137137} ) ;
138138
139139// Only used in DEV for exhaustiveness validation.
140- const knownHTMLTopLevelTypes = [
140+ let knownHTMLTopLevelTypes = __DEV__ && [
141141 'topAbort' ,
142142 'topCancel' ,
143143 'topCanPlay' ,
@@ -219,6 +219,7 @@ const SimpleEventPlugin: PluginModule<MouseEvent> = {
219219 case 'topMouseOut' :
220220 case 'topMouseOver' :
221221 case 'topContextMenu' :
222+
222223 EventConstructor = SyntheticMouseEvent ;
223224 break ;
224225 case 'topDrag' :
@@ -258,7 +259,7 @@ const SimpleEventPlugin: PluginModule<MouseEvent> = {
258259 break ;
259260 default :
260261 if ( __DEV__ ) {
261- if ( knownHTMLTopLevelTypes . indexOf ( topLevelType ) === - 1 ) {
262+ if ( ( knownHTMLTopLevelTypes : any ) . indexOf ( topLevelType ) === - 1 ) {
262263 warning (
263264 false ,
264265 'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' +
You can’t perform that action at this time.
0 commit comments