Skip to content

Instantly share code, notes, and snippets.

@trumball
Created October 21, 2013 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trumball/7084461 to your computer and use it in GitHub Desktop.
Save trumball/7084461 to your computer and use it in GitHub Desktop.
older browsers (thanks again Microsoft) will crash if you use console.log in your code and not have the developer tools open at the same time. Luckily its an easy fix. Simple use the below code snippet at the top of your code and good old IE should leave you alone: http://stackoverflow.com/questions/4743730/what-is-console-log-and-how-do-i-use-it
if(!window.console){ window.console = {log: function(){} }; }
console.log('Testing console');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment