Permalink
Browse files

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.
  • Loading branch information...
1 parent 8f7d4b0 commit 7598f8a740526a1deb54886f0710cb1d16b93d9e @joewood joewood committed Jul 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 load-image.js
View
2 load-image.js
@@ -24,7 +24,7 @@
oUrl;
img.onerror = callback;
img.onload = function () {
- if (oUrl && !options.noRevoke) {
+ if (oUrl && !(typeof(options)!="undefined" && options.noRevoke)) {
loadImage.revokeObjectURL(oUrl);
}
callback(loadImage.scale(img, options));

0 comments on commit 7598f8a

Please sign in to comment.