Skip to content

Commit 4931b41

Browse files
committed
Always pass a data arg to getTransformedOptions.
1 parent 6869b3b commit 4931b41

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

js/load-image-scale.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
// Returns transformed options, allows to override e.g.
4747
// maxWidth, maxHeight and crop options based on the aspectRatio.
48-
// gets img, options passed as arguments:
48+
// gets img, options, data passed as arguments:
4949
loadImage.getTransformedOptions = function (img, options) {
5050
var aspectRatio = options.aspectRatio
5151
var newOptions
@@ -168,7 +168,7 @@
168168
}
169169
if (useCanvas) {
170170
// eslint-disable-next-line no-param-reassign
171-
options = loadImage.getTransformedOptions(img, options, data)
171+
options = loadImage.getTransformedOptions(img, options, data || {})
172172
sourceX = options.left || 0
173173
sourceY = options.top || 0
174174
if (options.sourceWidth) {

0 commit comments

Comments
 (0)