File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ var ImageUtils = {
1010
1111 var canvas ;
1212
13- if ( image instanceof HTMLCanvasElement ) {
13+ if ( typeof HTMLCanvasElement == 'undefined' ) {
14+
15+ return image . src ;
16+
17+ } else if ( image instanceof HTMLCanvasElement ) {
1418
1519 canvas = image ;
1620
Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ Object.assign( FileLoader.prototype, {
7070 var isBase64 = ! ! dataUriRegexResult [ 2 ] ;
7171 var data = dataUriRegexResult [ 3 ] ;
7272
73- data = window . decodeURIComponent ( data ) ;
73+ data = decodeURIComponent ( data ) ;
7474
75- if ( isBase64 ) data = window . atob ( data ) ;
75+ if ( isBase64 ) data = atob ( data ) ;
7676
7777 try {
7878
@@ -126,7 +126,7 @@ Object.assign( FileLoader.prototype, {
126126 }
127127
128128 // Wait for next browser tick like standard XMLHttpRequest event dispatching does
129- window . setTimeout ( function ( ) {
129+ setTimeout ( function ( ) {
130130
131131 if ( onLoad ) onLoad ( response ) ;
132132
@@ -137,7 +137,7 @@ Object.assign( FileLoader.prototype, {
137137 } catch ( error ) {
138138
139139 // Wait for next browser tick like standard XMLHttpRequest event dispatching does
140- window . setTimeout ( function ( ) {
140+ setTimeout ( function ( ) {
141141
142142 if ( onError ) onError ( error ) ;
143143
You can’t perform that action at this time.
0 commit comments