From 94ee0648098ec6d817772829a900e6f2fa7df61a Mon Sep 17 00:00:00 2001 From: Wim Bruynooghe Date: Thu, 7 Mar 2013 09:52:54 +0100 Subject: [PATCH] Fix in Dygraph.log for IE8 In IE8, the console.log functions aren't true Javascript functions. They don't support the "apply" or "call" methods. All Javascript code stopped working when a log message was being generated, therefor this small fix. --- dygraph-utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dygraph-utils.js b/dygraph-utils.js index 11a2fba..035aba6 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -79,7 +79,7 @@ Dygraph.log = function(severity, message) { // In older versions of Firefox, only console.log is defined. var console = window.console; var log = function(console, method, msg) { - if (method) { + if (method && typeof(method) == 'function') { method.call(console, msg); } else { console.log(msg); -- 2.7.4