From 073d49dc51b8c1a1f5ce7dc59f136ea329c0a784 Mon Sep 17 00:00:00 2001 From: doktordirk Date: Wed, 18 May 2016 18:38:13 +0200 Subject: [PATCH] fix(index): moved console polyfill to aurelia-polyfills --- src/index.js | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/src/index.js b/src/index.js index 87a8003..37ad524 100644 --- a/src/index.js +++ b/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. */