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) {
return this._children.reduce((sum, c) => {
const duration = c.durationOfType(type);
if (duration) {
return sum + duration;
}
return sum + (duration ?? 0);
}, 0);
} else {
return 0;