Browse files

Fixed a file loading on Opera browser

  • Loading branch information...
1 parent 1546f50 commit 405046814467aabf19b4153e6e7e1f2d5ba9ae98 @naoina naoina committed Jun 18, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 load-image.js
View
4 load-image.js
@@ -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 4050468

Please sign in to comment.