Skip to content

Commit

Permalink
fix(index): moved console polyfill to aurelia-polyfills
Browse files Browse the repository at this point in the history
  • Loading branch information
doktordirk committed May 18, 2016
1 parent ebefb2b commit 073d49d
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/index.js
@@ -1,27 +1,6 @@
import {PLATFORM} from 'aurelia-pal';
import {Logger} from 'aurelia-logging';

(function(global) {
global.console = global.console || {};
let con = global.console;
let prop;
let method;
let empty = {};
let dummy = function() {};
let properties = 'memory'.split(',');
let methods = ('assert,clear,count,debug,dir,dirxml,error,exception,group,' +
'groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,' +
'show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn').split(',');
while (prop = properties.pop()) if (!con[prop]) con[prop] = empty;
while (method = methods.pop()) if (!con[method]) con[method] = dummy;
})(PLATFORM.global);

if (PLATFORM.global.console && typeof console.log === 'object') {
['log', 'info', 'warn', 'error', 'assert', 'dir', 'clear', 'profile', 'profileEnd'].forEach(function(method) {
console[method] = this.bind(console[method], console);
}, Function.prototype.call);
}

/*
* An implementation of the Appender interface.
*/
Expand Down

0 comments on commit 073d49d

Please sign in to comment.