From 772f7a2757c33ed0dd45a4c7b6a8c60f49c7fe94 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 10 Nov 2021 12:17:43 +0530 Subject: [PATCH] Account for duration being null --- src/logging/LogItem.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/logging/LogItem.ts b/src/logging/LogItem.ts index bd6958e1..0a896841 100644 --- a/src/logging/LogItem.ts +++ b/src/logging/LogItem.ts @@ -85,7 +85,10 @@ export class LogItem { } durationWithoutType(type) { - return this.duration - this.durationOfType(type); + if (this.duration) { + return this.duration - this.durationOfType(type); + } + return null; } durationOfType(type) {