fix: make fcc console log undefined

This commit is contained in:
Oliver Eyton-Williams
2019-09-27 13:54:29 +02:00
committed by mrugesh
parent 6b5aaee3c5
commit aada59b068
2 changed files with 2 additions and 2 deletions

View File

@ -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();
}

View File

@ -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;