From: Wim Bruynooghe Date: Thu, 7 Mar 2013 08:52:54 +0000 (+0100) Subject: Fix in Dygraph.log for IE8 X-Git-Tag: v1.0.0~44^2 X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=94ee0648098ec6d817772829a900e6f2fa7df61a;p=dygraphs.git 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. --- 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);