Skip to content

Commit

Permalink
browser: check for console.log truthiness instead
Browse files Browse the repository at this point in the history
Related to PR #166
  • Loading branch information
mooyoul committed Dec 29, 2014
1 parent 4dce97e commit 6af0b4d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,8 @@ function formatArgs() {
function log() {
// This hackery is required for IE8,
// 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.
return console
&& console.log
&& Function.prototype.apply.call(console.log, console, arguments);
}

Expand Down

0 comments on commit 6af0b4d

Please sign in to comment.