From 2444b4c0084d86610949b4d449112e4bbde7b6ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Garc=C3=ADa=20Aubert?= Date: Thu, 11 Jun 2020 13:04:19 +0200 Subject: [PATCH] rename error => errors to avoid type clashing in ES --- metro/log-collector.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/metro/log-collector.js b/metro/log-collector.js index 4eda405d..39e3df9c 100644 --- a/metro/log-collector.js +++ b/metro/log-collector.js @@ -47,6 +47,9 @@ module.exports = function logCollector () { // rename level => levelname to avoid type clashing in ES accEntry.levelname = LEVELS[accEntry.level]; delete accEntry.level; + accEntry.errors = accEntry.error; + delete accEntry.error; + accEntry.time = entry.time; this.push(`${JSON.stringify(accEntry)}\n`); logs.delete(id);