We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 406d4e0 commit 7c729d7Copy full SHA for 7c729d7
lib/logger/logger.js
@@ -5,7 +5,12 @@ var SUPPORTED_METHODS = [
5
];
6
7
function Logger() {
8
- this.setMethods(console);
+ var defaultMethods = {};
9
+ SUPPORTED_METHODS.forEach(function (method) {
10
+ // Deal with Chrome issue: https://bugs.chromium.org/p/chromium/issues/detail?id=179628
11
+ defaultMethods[method] = console[method].bind(console);
12
+ });
13
+ this.setMethods(defaultMethods);
14
}
15
module.exports = Logger;
16
@@ -15,7 +20,7 @@ Logger.prototype.setMethods = function (overrides) {
20
21
SUPPORTED_METHODS.forEach(function (method) {
17
22
if (typeof overrides[method] === 'function') {
18
- logger[method] = overrides[method].bind(overrides);
23
+ logger[method] = overrides[method];
19
24
25
});
26
};
0 commit comments