Skip to content

Commit 24b096e

Browse files
committed
fixed logger
1 parent 7ac9042 commit 24b096e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/Util.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ html2canvas.prototype.log = function(a){
44

55
if (this.opts.logging){
66

7-
var logger = window.console.log || function(log){
8-
alert(log);
9-
};
7+
if (window.console && window.console.log){
8+
console.log(a);
9+
}else{
10+
alert(a);
11+
}
1012
/*
1113
if (typeof(window.console) != "undefined" && console.log){
1214
console.log(a);

0 commit comments

Comments
 (0)