Skip to content

Commit

Permalink
Use indexOf instead of includes in RangeKeyboardFixture
Browse files Browse the repository at this point in the history
Allows the DOM Fixture change test case to work in older browsers.
  • Loading branch information
nhunzaker committed Oct 6, 2017
1 parent 7ec46e0 commit f322b5c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f322b5c

Please sign in to comment.