Skip to content

Commit 7598f8a

Browse files
committed
Fix to check valid 'options' before noRevoke chk
Added a test to see if options is set before dereferencing the object to check for noRevoke.
1 parent 8f7d4b0 commit 7598f8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

load-image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
oUrl;
2525
img.onerror = callback;
2626
img.onload = function () {
27-
if (oUrl && !options.noRevoke) {
27+
if (oUrl && !(typeof(options)!="undefined" && options.noRevoke)) {
2828
loadImage.revokeObjectURL(oUrl);
2929
}
3030
callback(loadImage.scale(img, options));

0 commit comments

Comments
 (0)