Skip to content

Commit

Permalink
fixup screenshotConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
shirotech authored and meinaart committed Aug 11, 2020
1 parent 5657da1 commit 6e862c9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ function getImageConfig(options = {}) {

function getScreenshotConfig(options = {}) {
const screenshotConfig = Object.keys(DEFAULT_SCREENSHOT_CONFIG)
.filter((key) => options && options[key] !== undefined)
.filter((key) => options.screenshotConfig && options.screenshotConfig[key] !== undefined)
.reduce(
(imageConfig, key) => {
imageConfig[key] = options[key];
return imageConfig;
(currentConfig, key) => {
currentConfig[key] = options.screenshotConfig[key];
return currentConfig;
},
merge({}, DEFAULT_SCREENSHOT_CONFIG, getConfig().screenshotConfig)
);
Expand Down

0 comments on commit 6e862c9

Please sign in to comment.