Skip to content

Commit 3a285be

Browse files
committed
Merge pull request debug-js#166 from mooyoul/ie8
browser: Fixed that no logs output on IE8/9
2 parents 953162b + 6af0b4d commit 3a285be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

browser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ function formatArgs() {
103103
function log() {
104104
// This hackery is required for IE8,
105105
// where the `console.log` function doesn't have 'apply'
106-
return 'object' == typeof console
107-
&& 'function' == typeof console.log
106+
return console
107+
&& console.log
108108
&& Function.prototype.apply.call(console.log, console, arguments);
109109
}
110110

0 commit comments

Comments
 (0)