Skip to content

Commit

Permalink
fix: finishRun stack overflow (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnoC authored Sep 27, 2021
1 parent 8005df2 commit 75130b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/axe-core-api/lib/axe/api/run.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def audit(page)
var callback = arguments[arguments.length - 1];
var context = arguments[0] || document;
var options = arguments[1] || {};
#{METHOD_NAME}(context, options).then(callback);
#{METHOD_NAME}(context, options).then(res => JSON.parse(JSON.stringify(res))).then(callback);
JS
page.execute_async_script_fixed script, *js_args
end
Expand Down Expand Up @@ -160,7 +160,7 @@ def axe_run_partial(page, context)
const options = arguments[1];
const cb = arguments[arguments.length - 1];
try {
const ret = window.axe.runPartial(context, options);
const ret = window.axe.runPartial(context, options).then(res => JSON.parse(JSON.stringify(res)));
cb(ret);
} catch (err) {
const ret = {
Expand Down

0 comments on commit 75130b0

Please sign in to comment.