Skip to content

Commit

Permalink
fix: capturing console.log on IE
Browse files Browse the repository at this point in the history
Use Function.prototype.apply.call(log, ...) instead of log.apply(...)
to avoid an error when IE's console is open.

Closes #329
  • Loading branch information
timbertson committed May 12, 2013
1 parent 0d3d97e commit fa4b686
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/karma.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
};

Expand Down

0 comments on commit fa4b686

Please sign in to comment.