File tree Expand file tree Collapse file tree 3 files changed +31
-9
lines changed Expand file tree Collapse file tree 3 files changed +31
-9
lines changed Original file line number Diff line number Diff line change 139139_rdata = / ^ d a t a : [ ^ , ] + , / ,
140140
141141_toString = { } . toString ,
142+ _supportConsoleLog ,
143+ _supportConsoleLogApply ,
142144
143145
144146Math = window . Math ,
343345} ,
344346
345347log : function ( ) {
346- if ( api . debug && window . console && console . log ) {
347- if ( console . log . apply ) {
348+ if ( api . debug && _supportConsoleLog ) {
349+ if ( _supportConsoleLogApply ) {
348350console . log . apply ( console , arguments ) ;
349351}
350352else {
16101612_one ( reader , _readerEvents , function ( evt ) {
16111613var isFile = evt . type != 'error' ;
16121614if ( isFile ) {
1613- reader . abort ( ) ;
1615+ if ( reader . readyState == void 0 || reader . readyState === 1 /*LOADING*/ ) {
1616+ reader . abort ( ) ;
1617+ }
16141618callback ( isFile ) ;
16151619}
16161620else {
18871891} ) ;
18881892
18891893
1890- // @configuration
1894+ // Configuration
1895+ try {
1896+ _supportConsoleLog = ! ! console . log ;
1897+ _supportConsoleLogApply = ! ! console . log . apply ;
1898+ }
1899+ catch ( err ) { }
1900+
18911901if ( ! api . flashUrl ) { api . flashUrl = api . staticPath + 'FileAPI.flash.swf' ; }
18921902if ( ! api . flashImageUrl ) { api . flashImageUrl = api . staticPath + 'FileAPI.flash.image.swf' ; }
18931903if ( ! api . flashWebcamUrl ) { api . flashWebcamUrl = api . staticPath + 'FileAPI.flash.camera.swf' ; }
Original file line number Diff line number Diff line change 139139_rdata = / ^ d a t a : [ ^ , ] + , / ,
140140
141141_toString = { } . toString ,
142+ _supportConsoleLog ,
143+ _supportConsoleLogApply ,
142144
143145
144146Math = window . Math ,
343345} ,
344346
345347log : function ( ) {
346- if ( api . debug && window . console && console . log ) {
347- if ( console . log . apply ) {
348+ if ( api . debug && _supportConsoleLog ) {
349+ if ( _supportConsoleLogApply ) {
348350console . log . apply ( console , arguments ) ;
349351}
350352else {
16101612_one ( reader , _readerEvents , function ( evt ) {
16111613var isFile = evt . type != 'error' ;
16121614if ( isFile ) {
1613- reader . abort ( ) ;
1615+ if ( reader . readyState == void 0 || reader . readyState === 1 /*LOADING*/ ) {
1616+ reader . abort ( ) ;
1617+ }
16141618callback ( isFile ) ;
16151619}
16161620else {
18871891} ) ;
18881892
18891893
1890- // @configuration
1894+ // Configuration
1895+ try {
1896+ _supportConsoleLog = ! ! console . log ;
1897+ _supportConsoleLogApply = ! ! console . log . apply ;
1898+ }
1899+ catch ( err ) { }
1900+
18911901if ( ! api . flashUrl ) { api . flashUrl = api . staticPath + 'FileAPI.flash.swf' ; }
18921902if ( ! api . flashImageUrl ) { api . flashImageUrl = api . staticPath + 'FileAPI.flash.image.swf' ; }
18931903if ( ! api . flashWebcamUrl ) { api . flashWebcamUrl = api . staticPath + 'FileAPI.flash.camera.swf' ; }
Original file line number Diff line number Diff line change 15181518_one ( reader , _readerEvents , function ( evt ) {
15191519var isFile = evt . type != 'error' ;
15201520if ( isFile ) {
1521- reader . abort ( ) ;
1521+ if ( reader . readyState == void 0 || reader . readyState === 1 /*LOADING*/ ) {
1522+ reader . abort ( ) ;
1523+ }
15221524callback ( isFile ) ;
15231525}
15241526else {
You can’t perform that action at this time.
0 commit comments