Skip to content

Commit efea8fe

Browse files
committed
Add a default 0 value for start and end in the media_element entity time ranges
1 parent e56256f commit efea8fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/browser-plugin-media-tracking/src/helperFunctions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type TimeRange = { start: number; end: number };
5353
export function timeRangesToObjectArray(t: TimeRanges): TimeRange[] {
5454
const out: TimeRange[] = [];
5555
for (let i = 0; i < t.length; i++) {
56-
out.push({ start: t.start(i), end: t.end(i) });
56+
out.push({ start: t.start(i) || 0, end: t.end(i) || 0 });
5757
}
5858
return out;
5959
}

0 commit comments

Comments
 (0)