Skip to content

Commit ba3eec2

Browse files
committed
Handle cases where loadImage failed to load the image.
1 parent 74f0c11 commit ba3eec2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/jquery.fileupload-image.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Image Preview & Resize Plugin 1.3.0
2+
* jQuery File Upload Image Preview & Resize Plugin 1.3.1
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2013, Sebastian Tschan
@@ -170,7 +170,7 @@
170170
// Accepts the options maxWidth, maxHeight, minWidth,
171171
// minHeight, canvas and crop:
172172
resizeImage: function (data, options) {
173-
if (options.disabled) {
173+
if (options.disabled || !(data.canvas || data.img)) {
174174
return data;
175175
}
176176
options = $.extend({canvas: true}, options);

0 commit comments

Comments
 (0)