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: {
137
137
} ) ;
138
138
139
139
// Only used in DEV for exhaustiveness validation.
140
- const knownHTMLTopLevelTypes = [
140
+ let knownHTMLTopLevelTypes = __DEV__ && [
141
141
'topAbort' ,
142
142
'topCancel' ,
143
143
'topCanPlay' ,
@@ -219,6 +219,7 @@ const SimpleEventPlugin: PluginModule<MouseEvent> = {
219
219
case 'topMouseOut' :
220
220
case 'topMouseOver' :
221
221
case 'topContextMenu' :
222
+
222
223
EventConstructor = SyntheticMouseEvent ;
223
224
break ;
224
225
case 'topDrag' :
@@ -258,7 +259,7 @@ const SimpleEventPlugin: PluginModule<MouseEvent> = {
258
259
break ;
259
260
default :
260
261
if ( __DEV__ ) {
261
- if ( knownHTMLTopLevelTypes . indexOf ( topLevelType ) === - 1 ) {
262
+ if ( ( knownHTMLTopLevelTypes : any ) . indexOf ( topLevelType ) === - 1 ) {
262
263
warning (
263
264
false ,
264
265
'SimpleEventPlugin: Unhandled event type, `%s`. This warning ' +
You can’t perform that action at this time.
0 commit comments