mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +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:
1 parent
7ec46e0fb0
commit
ea507f163b
1 file changed
+3
-1
@@ -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