Skip to content

Commit 8f14ba9

Browse files
author
Gabriel Fouasnon
committed
Revert "mimic console.js plugin"
This reverts commit e9c317e.
1 parent aad9c72 commit 8f14ba9

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/raven.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,13 +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-
// taken from plugis/console.js
1084-
// IE9 doesn't allow calling apply on console functions directly
1085-
// See: https://stackoverflow.com/questions/5472938/does-ie9-support-console-log-and-is-it-a-real-function#answer-5473193
1086-
Function.prototype.bind
1087-
.call(this._originalConsoleMethods[level], this._originalConsole)
1088-
.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+
}
10891090
}
10901091
},
10911092

0 commit comments

Comments
 (0)