mirror of
https://github.com/debug-js/debug.git
synced 2026-01-18 16:12:38 +00:00
browser: Fixed that no logs output on IE8/9
IE 8/9 reports console methods as objects when using the typeof operator. https://web.archive.org/web/20111123190115/http://whattheheadsaid.com/2011/04/internet-explorer-9s-problematic-console-object Closes #148.
This commit is contained in:
parent
953162b4fa
commit
4dce97e6db
@ -105,6 +105,7 @@ function log() {
|
||||
// where the `console.log` function doesn't have 'apply'
|
||||
return 'object' == typeof console
|
||||
&& 'function' == typeof console.log
|
||||
|| 'object' == typeof console.log // IE 8-9 reports console methods as objects when using the typeof operator.
|
||||
&& Function.prototype.apply.call(console.log, console, arguments);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user