Skip to content

Commit a8135ea

Browse files
qikevinjkwwardpeet
andcommitted
fix(gatsby-plugin-sharp): convert rotate boolean to int (#20894)
Co-authored-by: Ward Peeters <[email protected]>
1 parent db36d69 commit a8135ea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/gatsby-plugin-sharp/src/plugin-options.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const generalArgs = {
2525
toFormat: ``,
2626
toFormatBase64: ``,
2727
sizeByPixelDensity: false,
28+
rotate: 0,
2829
}
2930

3031
let pluginOptions = Object.assign({}, pluginDefaults)
@@ -56,7 +57,7 @@ exports.createTransformObject = args => {
5657
webpQuality: args.webpQuality,
5758
jpegProgressive: args.jpegProgressive || generalArgs.jpegProgressive,
5859
grayscale: args.grayscale || generalArgs.grayscale,
59-
rotate: !!args.rotate,
60+
rotate: args.rotate,
6061
trim: !!args.trim,
6162
duotone: args.duotone ? args.duotone : null,
6263
fit: args.fit,
@@ -150,7 +151,7 @@ exports.removeDefaultValues = (args, pluginOptions) => {
150151
: undefined,
151152
grayscale:
152153
args.grayscale !== generalArgs.grayscale ? args.grayscale : undefined,
153-
rotate: args.rotate ? args.rotate : undefined,
154+
rotate: args.rotate !== generalArgs.rotate ? args.rotate : undefined,
154155
trim: args.trim ? args.trim : undefined,
155156
duotone: args.duotone || undefined,
156157
fit: args.fit,

0 commit comments

Comments
 (0)