We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6869b3b commit 4931b41Copy full SHA for 4931b41
1 file changed
js/load-image-scale.js
@@ -45,7 +45,7 @@
45
46
// Returns transformed options, allows to override e.g.
47
// maxWidth, maxHeight and crop options based on the aspectRatio.
48
- // gets img, options passed as arguments:
+ // gets img, options, data passed as arguments:
49
loadImage.getTransformedOptions = function (img, options) {
50
var aspectRatio = options.aspectRatio
51
var newOptions
@@ -168,7 +168,7 @@
168
}
169
if (useCanvas) {
170
// eslint-disable-next-line no-param-reassign
171
- options = loadImage.getTransformedOptions(img, options, data)
+ options = loadImage.getTransformedOptions(img, options, data || {})
172
sourceX = options.left || 0
173
sourceY = options.top || 0
174
if (options.sourceWidth) {
0 commit comments