Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

better detection for whether the console prototype hack logger will work

  • Loading branch information...
commit 96d5a70b234f5112d9a5da37102735f99b23eb5c 1 parent e19d79c
@paulbaumgart paulbaumgart authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 filters/logger/logger.js
View
5 filters/logger/logger.js
@@ -5,9 +5,10 @@ function Logger() {
}
}
-if (typeof console !== 'undefined' && typeof console.log === 'function') {
+try {
Logger.prototype = console;
-} else { // for the dreaded IE, which doesn't allow console.log.apply
+ (new Logger).groupEnd();
+} catch (e) {
function getLogFunction(name) {
return function(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
if (typeof console !== 'undefined') {
Please sign in to comment.
Something went wrong with that request. Please try again.