Skip to content

Commit fad954b

Browse files
authored
Default to config.prepareBaseImage if no param specified (#79)
* Update index.js We are only downloading the base image if the `options` param explicitly includes the option `{prepareBaseImage: false}`. Otherwise, it will omit downloading the base file, even if the helper configuration includes the prepareBaseImage option. This change allows us to default to the value in the config file if the method doesn't receive that param. * Update index.js
1 parent c2c76f1 commit fad954b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

index.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -306,12 +306,11 @@ class ResembleHelper extends Helper {
306306
options.tolerance = 0;
307307
}
308308

309-
if (this.prepareBaseImage) {
310-
options.prepareBaseImage = true;
311-
}
312-
309+
const prepareBaseImage = options.prepareBaseImage !== undefined
310+
? options.prepareBaseImage
311+
: (this.prepareBaseImage === true)
313312
const awsC = this.config.aws;
314-
if (awsC !== undefined && options.prepareBaseImage === false) {
313+
if (awsC !== undefined && prepareBaseImage === false) {
315314
await this._download(awsC.accessKeyId, awsC.secretAccessKey, awsC.region, awsC.bucketName, baseImage);
316315
}
317316
if (options.prepareBaseImage !== undefined && options.prepareBaseImage) {

0 commit comments

Comments
 (0)