From: Gilles Dubuc Date: Mon, 31 Mar 2014 13:57:05 +0000 (+0200) Subject: mediawiki.log: Fix unknown method "apply" error in IE9 and below X-Git-Tag: 1.31.0-rc.0~16418^2 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=e79862bc89857b4f9a9c48f2f25ccf786a6e287f;p=lhc%2Fweb%2Fwiklou.git mediawiki.log: Fix unknown method "apply" error in IE9 and below In IE < 10, the console.log function is implemented as a non-standard host function (not inheriting the regular Function prototype) which doesn't provide an "apply" method. Change-Id: I6ecf933589ec430ff4d1748a5f3c511b692e3b9a --- diff --git a/resources/mediawiki/mediawiki.log.js b/resources/mediawiki/mediawiki.log.js index dd22e354fa..2ca0bbd249 100644 --- a/resources/mediawiki/mediawiki.log.js +++ b/resources/mediawiki/mediawiki.log.js @@ -33,7 +33,7 @@ // Try to use an existing console // Generally we can cache this, but in this case we want to re-evaluate this as a // global property live so that things like Firebug Lite can take precedence. - if ( window.console && window.console.log ) { + if ( window.console && window.console.log && window.console.log.apply ) { args.unshift( prefix ); window.console.log.apply( window.console, args ); return;