From fa4b686a81ad826f256a4ca63c772af7ad6e411e Mon Sep 17 00:00:00 2001 From: Tim Cuthbertson Date: Wed, 8 May 2013 12:03:05 +1000 Subject: [PATCH] fix: capturing console.log on IE Use Function.prototype.apply.call(log, ...) instead of log.apply(...) to avoid an error when IE's console is open. Closes #329 --- static/karma.src.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/karma.src.js b/static/karma.src.js index 9c6d2ac06..0a75fb54f 100644 --- a/static/karma.src.js +++ b/static/karma.src.js @@ -72,7 +72,7 @@ var Karma = function(socket, context, navigator, location) { localConsole.log = function() { contextWindow.__karma__.info({dump: Array.prototype.slice.call(arguments, 0)}); - return browserConsoleLog.apply(localConsole, arguments); + return Function.prototype.apply.call(browserConsoleLog, localConsole, arguments); }; };