Skip to content

Commit

Permalink
fix: Stop indexOf override from crashing Axe (#968)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkf authored and WilcoFiers committed Jun 25, 2018
1 parent c3249c1 commit e3329ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/core/utils/aggregateChecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ axe.utils.aggregateChecks = function (nodeResOriginal) {

// map each result value to a priority
anyAllNone(nodeResult, function (check, type) {
let i = checkMap.indexOf(check.result);
let i = typeof check.result === 'undefined' ? -1 : checkMap.indexOf(check.result);
// default to cantTell
check.priority = i !== -1 ? i : axe.constants.CANTTELL_PRIO;

Expand Down Expand Up @@ -72,4 +72,4 @@ axe.utils.aggregateChecks = function (nodeResOriginal) {
delete nodeResult.priority;

return nodeResult;
};
};

0 comments on commit e3329ce

Please sign in to comment.