From db037bbe18606f8c7cb0617c7fa4171e8c0e52cc Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 25 Sep 2020 12:10:47 +0100 Subject: [PATCH] Maybe fix Flow --- packages/react-dom/src/events/plugins/SimpleEventPlugin.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-dom/src/events/plugins/SimpleEventPlugin.js b/packages/react-dom/src/events/plugins/SimpleEventPlugin.js index b852a3af360e0..b69d93398f33c 100644 --- a/packages/react-dom/src/events/plugins/SimpleEventPlugin.js +++ b/packages/react-dom/src/events/plugins/SimpleEventPlugin.js @@ -63,7 +63,7 @@ function extractEvents( return; } let SyntheticEventCtor = SyntheticEvent; - let reactEventType = domEventName; + let reactEventType: DOMEventName = domEventName; switch (domEventName) { case 'keypress': // Firefox creates a keypress event for function keys too. This removes @@ -172,7 +172,7 @@ function extractEvents( // Intentionally create event lazily. const event = new SyntheticEventCtor( reactName, - reactEventType, + ((reactEventType: any): string), null, nativeEvent, nativeEventTarget, @@ -203,7 +203,7 @@ function extractEvents( // Intentionally create event lazily. const event = new SyntheticEventCtor( reactName, - reactEventType, + ((reactEventType: any): string), null, nativeEvent, nativeEventTarget,