Skip to content

Commit

Permalink
fix: Safeguard IE against console.log
Browse files Browse the repository at this point in the history
Shield a reference to `window.console.log` with a simple if statement.
Fix the ability to use this page in IE without the inspector open. This
 was particularly an issue for developers running karma from within a
Microsoft-based IDE. The log message will just be swallowed on
environments that don't support `window.console`.

Closes karma-runner#1209
  • Loading branch information
freethejazz committed Feb 18, 2015
1 parent e21ac6a commit 0b5ff8f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/debug.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
if (info.dump && window.console) window.console.log(info.dump);
},
complete: function() {
window.console.log('Skipped ' + this.skipped + ' tests');
if (window.console) window.console.log('Skipped ' + this.skipped + ' tests');
},
store: function() {},
skipped: 0,
Expand Down

0 comments on commit 0b5ff8f

Please sign in to comment.