diff --git a/lib/core/utils/aggregateChecks.js b/lib/core/utils/aggregateChecks.js index 16c61ce9de..90135af319 100644 --- a/lib/core/utils/aggregateChecks.js +++ b/lib/core/utils/aggregateChecks.js @@ -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; @@ -72,4 +72,4 @@ axe.utils.aggregateChecks = function (nodeResOriginal) { delete nodeResult.priority; return nodeResult; -}; \ No newline at end of file +};