mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Use indexOf instead of includes in RangeKeyboardFixture (#11133)
Allows the DOM Fixture change test case to work in older browsers.
This commit is contained in:
@@ -30,7 +30,9 @@ class RangeKeyboardFixture extends React.Component {
|
||||
|
||||
handleKeydown = e => {
|
||||
// only interesting in arrow key events
|
||||
if (![37, 38, 39, 40].includes(e.keyCode)) return;
|
||||
if ([37, 38, 39, 40].indexOf(e.keyCode) < 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.setState(({keydownCount}) => {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user