Skip to content

Commit

Permalink
Fixes bug with undefined console in browsers
Browse files Browse the repository at this point in the history
ixti committed Dec 19, 2011
1 parent 14cc3c1 commit 2249eef
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions demo/js/base64.js
Original file line number Diff line number Diff line change
@@ -47,9 +47,10 @@
41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
];

if (console) {
logger.warn = console.warn || console.error || console.log || noop;
logger.warn = console.error || console.warn || console.log || noop;
if (window.console) {
logger = window.console;
logger.warn = logger.warn || logger.error || logger.log || noop;
logger.error = logger.error || logger.warn || logger.log || noop;
}

// internal helpers //////////////////////////////////////////////////////////

0 comments on commit 2249eef

Please sign in to comment.