Skip to content

Instantly share code, notes, and snippets.

@robertsosinski
Created January 23, 2010 04:16
Show Gist options
  • Save robertsosinski/284421 to your computer and use it in GitHub Desktop.
Save robertsosinski/284421 to your computer and use it in GitHub Desktop.
Makes console functions so browsers without firebug will not raise errors
window.console = window.console || {};
["log", "info", "debug", "warn", "error"].forEach(function(level) {
console[level] = console[level] || function(){}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment