From 37151dc06bc3af4f6a2c6995b9386cecb79f6797 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 2 Mar 2021 19:38:46 +0100 Subject: [PATCH] always log ids, etc in console logger, even if falsy --- src/logging/ConsoleLogger.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/logging/ConsoleLogger.js b/src/logging/ConsoleLogger.js index cac128fb..4dcda826 100644 --- a/src/logging/ConsoleLogger.js +++ b/src/logging/ConsoleLogger.js @@ -70,17 +70,17 @@ function printToConsole(item) { } function itemCaption(item) { - if (item._values?.t === "network") { - return `${item._values?.method} ${item._values?.url}`; - } else if (item._values.l && item._values?.id) { + if (item._values.t === "network") { + return `${item._values.method} ${item._values.url}`; + } else if (item._values.l && typeof item._values.id !== "undefined") { return `${item._values.l} ${item._values.id}`; - } else if (item._values.l && item._values?.status) { + } else if (item._values.l && typeof item._values.status !== "undefined") { return `${item._values.l} (${item._values.status})`; } else if (item._values.l && item.error) { return `${item._values.l} failed`; - } else if (item._values.ref) { + } else if (typeof item._values.ref !== "undefined") { return `ref ${item._values.ref}` } else { - return item._values.l || item._values?.type; + return item._values.l || item._values.type; } }