From 58105824d9669ed2fa9dafb9b76ee2c84965c311 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Tue, 16 Nov 2021 13:08:13 +0530 Subject: [PATCH] Fix error in reduce --- src/logging/LogItem.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/logging/LogItem.ts b/src/logging/LogItem.ts index 4600b6d5..c12308ef 100644 --- a/src/logging/LogItem.ts +++ b/src/logging/LogItem.ts @@ -141,9 +141,7 @@ export class LogItem implements ILogItem { } else if (this._children) { return this._children.reduce((sum, c) => { const duration = c.durationOfType(type); - if (duration) { - return sum + duration; - } + return sum + (duration ?? 0); }, 0); } else { return 0;