Skip to content

Commit

Permalink
AXE-200 : Fixed rule level latency issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Pooja0504 committed Jun 25, 2024
1 parent 66bfaec commit 13cf97c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/core/base/rule.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
};

/**
Expand Down

0 comments on commit 13cf97c

Please sign in to comment.