Skip to content

Commit

Permalink
Chrome didn't support Array.indexOf(arr, item), must use arr.indexOf()
Browse files Browse the repository at this point in the history
Fixes f0eff90
  • Loading branch information
henrikingo committed Jul 30, 2017
1 parent 6d738b3 commit 032a473
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions js/impress.js
Original file line number Diff line number Diff line change
Expand Up @@ -1540,7 +1540,6 @@
return isNaN(numeric) ? (fallback || 0) : Number(numeric);
};


var goto = function(event) {
if ( (!event) || (!event.target) )
return;
Expand All @@ -1563,7 +1562,7 @@
// Don't return, allow the other categories to work despite this error
}
else {
var index = Array.indexOf( keylist, event.origEvent.key )
var index = keylist.indexOf(event.origEvent.key);
if ( index >= 0 ) {
var next = nextlist[index];
if ( isNumber(next) ){
Expand Down
3 changes: 1 addition & 2 deletions src/plugins/goto/goto.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
return isNaN(numeric) ? (fallback || 0) : Number(numeric);
};


var goto = function(event) {
if ( (!event) || (!event.target) )
return;
Expand All @@ -53,7 +52,7 @@
// Don't return, allow the other categories to work despite this error
}
else {
var index = Array.indexOf( keylist, event.origEvent.key )
var index = keylist.indexOf(event.origEvent.key);
if ( index >= 0 ) {
var next = nextlist[index];
if ( isNumber(next) ){
Expand Down

0 comments on commit 032a473

Please sign in to comment.