We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9af17fb commit 4ccca18Copy full SHA for 4ccca18
plugins/browser-plugin-media-tracking/src/helperFunctions.ts
@@ -53,7 +53,11 @@ type TimeRange = { start: number; end: number };
53
export function timeRangesToObjectArray(t: TimeRanges): TimeRange[] {
54
const out: TimeRange[] = [];
55
for (let i = 0; i < t.length; i++) {
56
- out.push({ start: t.start(i) || 0, end: t.end(i) || 0 });
+ const start = t.start(i);
57
+ const end = t.end(i);
58
+ if (isFinite(start) && isFinite(end)) {
59
+ out.push({ start: start || 0, end: end || 0 });
60
+ }
61
}
62
return out;
63
0 commit comments