Fix Flow from #19239 (#19242)

This commit is contained in:
Dominic Gannaway
2020-07-02 16:37:10 +01:00
committed by GitHub
parent cd9046f815
commit 65c137768a
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ function isEventSupported(eventNameSuffix: string): boolean {
if (!isSupported) {
const element = document.createElement('div');
element.setAttribute(eventName, 'return;');
isSupported = typeof element[eventName] === 'function';
isSupported = typeof (element: any)[eventName] === 'function';
}
return isSupported;
@@ -62,7 +62,7 @@ function extractEvents(
// Firefox creates a keypress event for function keys too. This removes
// the unwanted keypress events. Enter is however both printable and
// non-printable. One would expect Tab to be as well (but it isn't).
if (getEventCharCode(nativeEvent) === 0) {
if (getEventCharCode(((nativeEvent: any): KeyboardEvent)) === 0) {
return;
}
/* falls through */