Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions load-image.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
} else {
url = file;
}
if (url) {
if (url && !(window.File && url instanceof File)) {
img.src = url;
return img;
} else {
Expand Down Expand Up @@ -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,
Expand Down