javascript - How can I get rid of these 'console.log is not defined' errors in IE? -


...without removing calls console.log obviously. doesn't need log or anything, want not show error. i'm trying

if (!window.console) {      window.console = {          log: function() {},          error: function() {},          warn: function() {}      }  } 

but doesn't seem fix it.

use debug.log following js file instead. kicks ass.

http://benalman.com/projects/javascript-debug-console-log/


Comments