Skip to content

Commit a847aeb

Browse files
author
Gabriel Fouasnon
committed
Fix broken logDebug() in IE less than v10
1 parent 62403b7 commit a847aeb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/raven.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,8 +1079,14 @@ Raven.prototype = {
10791079
},
10801080

10811081
_logDebug: function(level) {
1082+
var args = [].slice.call(arguments, 1);
10821083
if (this._originalConsoleMethods[level] && this.debug) {
1083-
this._originalConsoleMethods[level].apply(this._originalConsole, [].slice.call(arguments, 1));
1084+
try {
1085+
// For IE<10, cannot invoke 'apply' on console methods
1086+
this._originalConsoleMethods[level].apply(this._originalConsole, args);
1087+
} catch (err) {
1088+
this._originalConsole[level](args.join(' '));
1089+
}
10841090
}
10851091
},
10861092

0 commit comments

Comments
 (0)