Permalink
Browse files

If the console object exists, but doesn't have a log property, the

entire object isn't replaced.
  • Loading branch information...
1 parent 8ba56d4 commit 0813340806fac0bf26e2d01d210ae4101e47e0ce @bemjb bemjb committed Jul 15, 2011
Showing with 11 additions and 6 deletions.
  1. +4 −2 js/core/_jo.js
  2. +4 −2 js/jo.js
  3. +3 −2 js/jo_min.js
View
@@ -117,8 +117,10 @@ if (typeof HTMLElement === 'undefined')
HTMLElement = Object;
// no console.log? sad...
-if (typeof console === 'undefined' || typeof console.log !== 'function')
- console = {log: function(msg) { }};
+if (typeof console === 'undefined')
+ console = { };
+if (typeof console.log !== 'function')
+ console.log = function(msg) { };
// just a place to hang our hat
jo = {
View
@@ -150,8 +150,10 @@ if (typeof HTMLElement === 'undefined')
HTMLElement = Object;
// no console.log? sad...
-if (typeof console === 'undefined' || typeof console.log !== 'function')
- console = {log: function(msg) { }};
+if (typeof console === 'undefined')
+ console = { };
+if (typeof console.log !== 'function')
+ console.log = function(msg) { };
// just a place to hang our hat
jo = {
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 0813340

Please sign in to comment.