Skip to content

Commit 5354bd0

Browse files
authored
Merge pull request #58 from browserstack/AXE-200_latency_issue
fix: AXE-200 Fixed rule level latency issue
2 parents 66bfaec + 13cf97c commit 5354bd0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/core/base/rule.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,12 @@ Rule.prototype.run = function run(context, options = {}, resolve, reject) {
299299
// See https://github.com/dequelabs/axe-core/pull/1172 for discussion and details.
300300
q.defer(res => setTimeout(res, 0));
301301

302-
if (options.performanceTimer) {
303-
this._logRulePerformance();
304-
}
305-
306-
q.then(() => resolve(ruleResult)).catch(error => reject(error));
302+
q.then(() => {
303+
if (options.performanceTimer) {
304+
this._logRulePerformance();
305+
}
306+
resolve(ruleResult);
307+
}).catch(error => reject(error));
307308
};
308309

309310
/**

0 commit comments

Comments
 (0)