Skip to content

Commit

Permalink
Fix Flow from #19239 (#19242)
Browse files Browse the repository at this point in the history
  • Loading branch information
trueadm committed Jul 2, 2020
1 parent cd9046f commit 65c1377
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-dom/src/events/isEventSupported.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 65c1377

Please sign in to comment.