explicitly check for type, rather than truthy

This commit is contained in:
Bruno Windels 2021-11-17 12:58:08 +01:00
parent 74fb15e426
commit afc538e875

View File

@ -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