From 6af0b4d76431cb642ff443f69321c5bb8ba83b8c Mon Sep 17 00:00:00 2001 From: "Moo Yeol, Lee (Prescott)" Date: Tue, 30 Dec 2014 04:19:49 +0900 Subject: [PATCH] browser: check for console.log truthiness instead Related to PR #166 --- browser.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/browser.js b/browser.js index 702f2177..eaf1a133 100644 --- a/browser.js +++ b/browser.js @@ -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); }