diff --git a/lib/core/base/rule.js b/lib/core/base/rule.js index ea88d36a..e42c7429 100644 --- a/lib/core/base/rule.js +++ b/lib/core/base/rule.js @@ -299,11 +299,12 @@ Rule.prototype.run = function run(context, options = {}, resolve, reject) { // See https://github.com/dequelabs/axe-core/pull/1172 for discussion and details. q.defer(res => setTimeout(res, 0)); - if (options.performanceTimer) { - this._logRulePerformance(); - } - - q.then(() => resolve(ruleResult)).catch(error => reject(error)); + q.then(() => { + if (options.performanceTimer) { + this._logRulePerformance(); + } + resolve(ruleResult); + }).catch(error => reject(error)); }; /**