Fix error in reduce

This commit is contained in:
RMidhunSuresh 2021-11-16 13:08:13 +05:30
parent 4704a70cb7
commit 58105824d9

View File

@ -141,9 +141,7 @@ export class LogItem implements ILogItem {
} else if (this._children) { } else if (this._children) {
return this._children.reduce((sum, c) => { return this._children.reduce((sum, c) => {
const duration = c.durationOfType(type); const duration = c.durationOfType(type);
if (duration) { return sum + (duration ?? 0);
return sum + duration;
}
}, 0); }, 0);
} else { } else {
return 0; return 0;