Skip to content

Instantly share code, notes, and snippets.

@mjangda
Created April 29, 2010 19:37
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mjangda/384113 to your computer and use it in GitHub Desktop.
Save mjangda/384113 to your computer and use it in GitHub Desktop.
Protects you from console.log() errors for your IE and Firebug-less Firefox users.
// In case we forget to take out console statements. IE becomes very unhappy when we forget. Let's not make IE unhappy
if(typeof(console) === 'undefined') {
var console = {}
console.log = console.error = console.info = console.debug = console.warn = console.trace = console.dir = console.dirxml = console.group = console.groupEnd = console.time = console.timeEnd = console.assert = console.profile = function() {};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment