Permalink
Browse files

Try to catch conditions where console is not defined.

  • Loading branch information...
1 parent 3a1a957 commit 1e8710d17fa4e8f9f4b47538bbf87213a50d5153 Charles Jolley committed Aug 11, 2008
Showing with 7 additions and 0 deletions.
  1. +7 −0 core.js
View
@@ -19,6 +19,13 @@ require('license') ;
var YES = true ;
var NO = false ;
+// prevent a console.log from blowing things up if we are on a browser that
+// does not support it
+if (typeof console === 'undefined') {
+ var console = console || window.console || {} ;
+ console.log = console.info = console.warn = console.error = function(){};
+}
+
// ........................................
// BOOTSTRAP
//

0 comments on commit 1e8710d

Please sign in to comment.