Skip to content

Commit

Permalink
fix(gatsby-plugin-sharp): convert rotate boolean to int (#20894)
Browse files Browse the repository at this point in the history
Co-authored-by: Ward Peeters <ward@coding-tech.com>
  • Loading branch information
qikevinjkw and wardpeet committed Jan 27, 2020
1 parent db36d69 commit a8135ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/gatsby-plugin-sharp/src/plugin-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const generalArgs = {
toFormat: ``,
toFormatBase64: ``,
sizeByPixelDensity: false,
rotate: 0,
}

let pluginOptions = Object.assign({}, pluginDefaults)
Expand Down Expand Up @@ -56,7 +57,7 @@ exports.createTransformObject = args => {
webpQuality: args.webpQuality,
jpegProgressive: args.jpegProgressive || generalArgs.jpegProgressive,
grayscale: args.grayscale || generalArgs.grayscale,
rotate: !!args.rotate,
rotate: args.rotate,
trim: !!args.trim,
duotone: args.duotone ? args.duotone : null,
fit: args.fit,
Expand Down Expand Up @@ -150,7 +151,7 @@ exports.removeDefaultValues = (args, pluginOptions) => {
: undefined,
grayscale:
args.grayscale !== generalArgs.grayscale ? args.grayscale : undefined,
rotate: args.rotate ? args.rotate : undefined,
rotate: args.rotate !== generalArgs.rotate ? args.rotate : undefined,
trim: args.trim ? args.trim : undefined,
duotone: args.duotone || undefined,
fit: args.fit,
Expand Down

0 comments on commit a8135ea

Please sign in to comment.