fix: make fcc console log undefined
This commit is contained in:
committed by
mrugesh
parent
6b5aaee3c5
commit
aada59b068
@ -18,7 +18,7 @@ const __utils = (() => {
|
|||||||
|
|
||||||
const oldLog = self.console.log.bind(self.console);
|
const oldLog = self.console.log.bind(self.console);
|
||||||
self.console.log = function proxyConsole(...args) {
|
self.console.log = function proxyConsole(...args) {
|
||||||
logs.push(args.map(arg => JSON.stringify(arg)).join(' '));
|
logs.push(args.map(arg => '' + JSON.stringify(arg)).join(' '));
|
||||||
if (logs.join('\n').length > MAX_LOGS_SIZE) {
|
if (logs.join('\n').length > MAX_LOGS_SIZE) {
|
||||||
flushLogs();
|
flushLogs();
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ const mountFrame = document => ({ element, ...rest }) => {
|
|||||||
const buildProxyConsole = proxyLogger => ctx => {
|
const buildProxyConsole = proxyLogger => ctx => {
|
||||||
const oldLog = ctx.window.console.log.bind(ctx.window.console);
|
const oldLog = ctx.window.console.log.bind(ctx.window.console);
|
||||||
ctx.window.console.log = function proxyConsole(...args) {
|
ctx.window.console.log = function proxyConsole(...args) {
|
||||||
proxyLogger(args.map(arg => JSON.stringify(arg)).join(' '));
|
proxyLogger(args.map(arg => '' + JSON.stringify(arg)).join(' '));
|
||||||
return oldLog(...args);
|
return oldLog(...args);
|
||||||
};
|
};
|
||||||
return ctx;
|
return ctx;
|
||||||
|
Reference in New Issue
Block a user