Use indexOf instead of includes in RangeKeyboardFixture (#11133)
Allows the DOM Fixture change test case to work in older browsers.
Nathan Hunzaker committed
Oct 6, 2017 at 10:45 UTC
ea507f163b0b1b32446ed4dd4454580ed6d68f5c
1 file changed
+3
-1
fixtures/dom/src/components/fixtures/input-change-events/RangeKeyboardFixture.js
+3
-1
@@ -30,7 +30,9 @@ class RangeKeyboardFixture extends React.Component {
30
31
handleKeydown = e => {
32
// only interesting in arrow key events
33
- if (![37, 38, 39, 40].includes(e.keyCode)) return;
33
+ if ([37, 38, 39, 40].indexOf(e.keyCode) < 0) {
34
+ return;
35
+ }
36
37
this.setState(({keydownCount}) => {
38
return {