Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion src/extras/ImageUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ var ImageUtils = {

var canvas;

if ( image instanceof HTMLCanvasElement ) {
if ( typeof HTMLCanvasElement == 'undefined' ) {

return image.src;

} else if ( image instanceof HTMLCanvasElement ) {

canvas = image;

Expand Down
8 changes: 4 additions & 4 deletions src/loaders/FileLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ Object.assign( FileLoader.prototype, {
var isBase64 = !! dataUriRegexResult[ 2 ];
var data = dataUriRegexResult[ 3 ];

data = window.decodeURIComponent( data );
data = decodeURIComponent( data );

if ( isBase64 ) data = window.atob( data );
if ( isBase64 ) data = atob( data );

try {

Expand Down Expand Up @@ -126,7 +126,7 @@ Object.assign( FileLoader.prototype, {
}

// Wait for next browser tick like standard XMLHttpRequest event dispatching does
window.setTimeout( function () {
setTimeout( function () {

if ( onLoad ) onLoad( response );

Expand All @@ -137,7 +137,7 @@ Object.assign( FileLoader.prototype, {
} catch ( error ) {

// Wait for next browser tick like standard XMLHttpRequest event dispatching does
window.setTimeout( function () {
setTimeout( function () {

if ( onError ) onError( error );

Expand Down