Permalink
Browse files

Fix for IE9 strangeness on check for console

  • Loading branch information...
1 parent 28af275 commit c3f03b0a21183c1a00bc4b9ced502bf1d078c279 @jslaybaugh jslaybaugh committed May 22, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 consolelog.js
View
@@ -1,5 +1,5 @@
// Tell IE9 to use its built-in console
-if (Function.prototype.bind && console && typeof console.log == "object") {
+if (Function.prototype.bind && (typeof console === 'object' || typeof console === 'function') && typeof console.log == "object") {
["log","info","warn","error","assert","dir","clear","profile","profileEnd"]
.forEach(function (method) {
console[method] = this.call(console[method], console);

0 comments on commit c3f03b0

Please sign in to comment.