diff --git a/client/src/client/workers/test-evaluator.js b/client/src/client/workers/test-evaluator.js index 30584bd40e..172b42e533 100644 --- a/client/src/client/workers/test-evaluator.js +++ b/client/src/client/workers/test-evaluator.js @@ -16,9 +16,16 @@ const __utils = (() => { } } + function replacer(key, value) { + if (Number.isNaN(value)) { + return 'NaN'; + } + return value; + } + 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, replacer)).join(' ')); if (logs.join('\n').length > MAX_LOGS_SIZE) { flushLogs(); }