From 8e110560ae9776d44d145993627f522f46715ca7 Mon Sep 17 00:00:00 2001 From: Jonathan Baudanza Date: Mon, 16 May 2011 20:06:38 -0700 Subject: [PATCH] In IE, the console functions aren't "function", but are "objects". As such they don't have an .apply method. --- src/davis.logger.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/davis.logger.js b/src/davis.logger.js index f914907..28c8747 100644 --- a/src/davis.logger.js +++ b/src/davis.logger.js @@ -29,7 +29,7 @@ Davis.logger = (function () { var prepArgs = function (args) { var a = Davis.utils.toArray(args) a.unshift(timestamp()) - return a + return a.join(' '); } /** @@ -39,7 +39,7 @@ Davis.logger = (function () { * @params {String} All arguments are combined and logged to the console. */ var error = function () { - if (window.console) console.error.apply(console, prepArgs(arguments)) + if (window.console) console.error(prepArgs(arguments)); } /** @@ -49,7 +49,7 @@ Davis.logger = (function () { * @params {String} All arguments are combined and logged to the console. */ var info = function () { - if (window.console) console.info.apply(console, prepArgs(arguments)) + if (window.console) console.info(prepArgs(arguments)); } /** @@ -59,7 +59,7 @@ Davis.logger = (function () { * @params {String} All arguments are combined and logged to the console. */ var warn = function () { - if (window.console) console.warn.apply(console, prepArgs(arguments)) + if (window.console) console.warn(prepArgs(arguments)); } /**