Skip to content

Commit 2096484

Browse files
authored
Merge pull request #71 from kltchnko/dev
Fix #70: options object being altered by compress func
2 parents 30e2b1c + d830728 commit 2096484

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

dist/browser-image-compression.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser-image-compression.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser-image-compression.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/browser-image-compression.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/image-compression.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ export default async function compress (file, options) {
5454
incProgress()
5555

5656
// exifOrientation
57-
options.exifOrientation = options.exifOrientation || await getExifOrientation(file)
57+
const exifOrientation = options.exifOrientation || await getExifOrientation(file)
5858
incProgress()
59-
const orientationFixedCanvas = (await isAutoOrientationInBrowser) ? maxWidthOrHeightFixedCanvas : followExifOrientation(maxWidthOrHeightFixedCanvas, options.exifOrientation)
59+
const orientationFixedCanvas = (await isAutoOrientationInBrowser) ? maxWidthOrHeightFixedCanvas : followExifOrientation(maxWidthOrHeightFixedCanvas, exifOrientation)
6060
incProgress()
6161

6262
let quality = options.initialQuality || 1.0

0 commit comments

Comments
 (0)