From afc538e87598a7bfa82c5158ce5f2c8d20353131 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 17 Nov 2021 12:58:08 +0100 Subject: [PATCH] explicitly check for type, rather than truthy --- src/logging/LogItem.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/logging/LogItem.ts b/src/logging/LogItem.ts index 1d9ce20b..0e5b0ecb 100644 --- a/src/logging/LogItem.ts +++ b/src/logging/LogItem.ts @@ -144,7 +144,7 @@ export class LogItem implements ILogItem { // in (v)alues, (l)abel and (t)ype are also reserved. const item: ISerializedItem = { // (s)tart - s: parentStartTime? this.start - parentStartTime : this.start, + s: typeof parentStartTime === "number" ? this.start - parentStartTime : this.start, // (d)uration d: this.duration, // (v)alues