Skip to content

Commit

Permalink
Clean up command opts
Browse files Browse the repository at this point in the history
  • Loading branch information
bearfriend committed Jun 24, 2023
1 parent 715c04e commit 0e89f3c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/server/visual-diff-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export function visualDiff({ updateGoldens = false, runSubset = false } = {}) {
}
}

const opts = payload.opts || {};
opts.margin = opts.margin || DEFAULT_MARGIN;
const opts = { ...payload.opts };
opts.margin ??= DEFAULT_MARGIN;

const page = session.browser.getPage(session.id);
await page.screenshot({
Expand Down

0 comments on commit 0e89f3c

Please sign in to comment.