From 13cf97c4759c23a7c2847b16615b9cb7fadb4d8b Mon Sep 17 00:00:00 2001 From: pooja0504 Date: Tue, 25 Jun 2024 12:42:03 +0530 Subject: [PATCH] AXE-200 : Fixed rule level latency issue --- lib/core/base/rule.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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)); }; /**