diff --git a/public/js/helpers.js b/public/js/helpers.js index 81cecdae9..b889ab26f 100644 --- a/public/js/helpers.js +++ b/public/js/helpers.js @@ -16,3 +16,28 @@ })(Object); +(function (console) { + + 'use strict'; + + if ('undefined' === console) { + return; + } + + /* Fix console for IE9, TBD: test IE8 */ + if (typeof console.log == 'object' && Function.prototype.bind && console) { + [ + 'log', + 'info', + 'warn', + 'error', + 'assert', + 'dir', + 'clear', + 'profile', + 'profileEnd' + ].forEach(function (method) { + console[method] = this.call(console[method], console); + }, Function.prototype.bind); + } +})(console);