Permalink
Browse files

Merge pull request #6 from naoina/master

Fixed a file loading on Opera browser
  • Loading branch information...
2 parents 1546f50 + 4050468 commit 9f2ef8d1025c7d9d3dff2fbc2452a1b07dfee9a0 @blueimp committed Jun 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 load-image.js
View
@@ -37,7 +37,7 @@
} else {
url = file;
}
- if (url) {
+ if (url && !(window.File && url instanceof File)) {
img.src = url;
return img;
} else {
@@ -92,7 +92,7 @@
};
loadImage.revokeObjectURL = function (url) {
- return urlAPI ? urlAPI.revokeObjectURL(url) : false;
+ return urlAPI && typeof urlAPI.revokeObjectURL !== 'undefined' ? urlAPI.revokeObjectURL(url) : false;
};
// Loads a given File object via FileReader interface,

0 comments on commit 9f2ef8d

Please sign in to comment.