Skip to content

Commit e3329ce

Browse files
zkfWilcoFiers
authored andcommitted
fix: Stop indexOf override from crashing Axe (#968)
1 parent c3249c1 commit e3329ce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/core/utils/aggregateChecks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ axe.utils.aggregateChecks = function (nodeResOriginal) {
2323

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

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

7474
return nodeResult;
75-
};
75+
};

0 commit comments

Comments
 (0)