Skip to content

Commit 963ab1c

Browse files
committed
#353: + _supportConsoleLog
1 parent b68e6e8 commit 963ab1c

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

lib/FileAPI.core.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
_rdata = /^data:[^,]+,/,
4646

4747
_toString = {}.toString,
48+
_supportConsoleLog,
49+
_supportConsoleLogApply,
4850

4951

5052
Math = window.Math,
@@ -249,8 +251,8 @@
249251
},
250252

251253
log: function (){
252-
if( api.debug && window.console && console.log ){
253-
if( console.log.apply ){
254+
if( api.debug && _supportConsoleLog ){
255+
if( _supportConsoleLogApply ){
254256
console.log.apply(console, arguments);
255257
}
256258
else {
@@ -1793,7 +1795,13 @@
17931795
});
17941796

17951797

1796-
// @configuration
1798+
// Configuration
1799+
try {
1800+
_supportConsoleLog = !!console.log;
1801+
_supportConsoleLogApply = !!console.log.apply;
1802+
}
1803+
catch (err) {}
1804+
17971805
if( !api.flashUrl ){ api.flashUrl = api.staticPath + 'FileAPI.flash.swf'; }
17981806
if( !api.flashImageUrl ){ api.flashImageUrl = api.staticPath + 'FileAPI.flash.image.swf'; }
17991807
if( !api.flashWebcamUrl ){ api.flashWebcamUrl = api.staticPath + 'FileAPI.flash.camera.swf'; }

0 commit comments

Comments
 (0)