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);
|
||||
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) {
|
||||
flushLogs();
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ const mountFrame = document => ({ element, ...rest }) => {
|
||||
const buildProxyConsole = proxyLogger => ctx => {
|
||||
const oldLog = ctx.window.console.log.bind(ctx.window.console);
|
||||
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 ctx;
|
||||
|
Reference in New Issue
Block a user