diff --git a/src/server/visual-diff-plugin.js b/src/server/visual-diff-plugin.js index 970bf629..c333595c 100644 --- a/src/server/visual-diff-plugin.js +++ b/src/server/visual-diff-plugin.js @@ -129,8 +129,7 @@ export function visualDiff({ updateGoldens = false, runSubset = false } = {}) { } } - const opts = payload.opts || {}; - opts.margin = opts.margin || DEFAULT_MARGIN; + const opts = { margin: DEFAULT_MARGIN, ...payload.opts }; const page = session.browser.getPage(session.id); await page.screenshot({