@samitouri / QOS-React / commits / 65c137768a

Fix Flow from #19239 (#19242)

Dominic Gannaway committed Jul 2, 2020 at 16:37 UTC 65c137768abf696ee1c79a026d6df3a166dd8553
2 files changed +2 -2
packages/react-dom/src/events/isEventSupported.js
+1 -1
@@ -33,7 +33,7 @@ function isEventSupported(eventNameSuffix: string): boolean {
33 if (!isSupported) {
34 const element = document.createElement('div');
35 element.setAttribute(eventName, 'return;');
36 - isSupported = typeof element[eventName] === 'function';
36 + isSupported = typeof (element: any)[eventName] === 'function';
37 }
38
39 return isSupported;
packages/react-dom/src/events/plugins/ModernSimpleEventPlugin.js
+1 -1
@@ -62,7 +62,7 @@ function extractEvents(
62 // Firefox creates a keypress event for function keys too. This removes
63 // the unwanted keypress events. Enter is however both printable and
64 // non-printable. One would expect Tab to be as well (but it isn't).
65 - if (getEventCharCode(nativeEvent) === 0) {
65 + if (getEventCharCode(((nativeEvent: any): KeyboardEvent)) === 0) {
66 return;
67 }
68 /* falls through */