We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1546f50 + 4050468 commit 9f2ef8dCopy full SHA for 9f2ef8d
1 file changed
load-image.js
@@ -37,7 +37,7 @@
37
} else {
38
url = file;
39
}
40
- if (url) {
+ if (url && !(window.File && url instanceof File)) {
41
img.src = url;
42
return img;
43
@@ -92,7 +92,7 @@
92
};
93
94
loadImage.revokeObjectURL = function (url) {
95
- return urlAPI ? urlAPI.revokeObjectURL(url) : false;
+ return urlAPI && typeof urlAPI.revokeObjectURL !== 'undefined' ? urlAPI.revokeObjectURL(url) : false;
96
97
98
// Loads a given File object via FileReader interface,
0 commit comments