Skip to content

Commit

Permalink
Patch window.console for IE9
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Brain committed Jul 20, 2016
1 parent 63ce964 commit 559db43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import { CONFIG } from '../conf';

const LOG_LEVELS = ['debug', 'info', 'warn', 'error'];

if (Function.prototype.bind && window.console && typeof console.log === 'object') {
[ 'log', 'info', 'warn', 'error' ].forEach(function(method) {
console[method] = this.bind(console[method], console);
}, Function.prototype.call);
}

export let log = {

clearLogs() {
Expand Down

0 comments on commit 559db43

Please # to comment.