Skip to content

Commit a11b865

Browse files
fix: opacity flicker
1 parent 7ab605a commit a11b865

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/features/Overview/ShredsProgression/shredsProgressionPlugin.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -676,16 +676,19 @@ function getGroupTsDeltas(
676676
.filter((v) => v !== undefined);
677677

678678
if (definedSlotTsDeltas.length === 0) {
679+
// no slots, no group
679680
continue;
680681
}
681682

682683
// ignore missing slots at the start when positioning group
683684
const minStart = Math.min(...definedSlotTsDeltas.map(([start]) => start));
684-
const ends = definedSlotTsDeltas.map(([, end]) => end);
685-
const definedEnds = ends.filter((end) => end !== undefined);
685+
686+
const definedEnds = definedSlotTsDeltas
687+
.map(([, end]) => end)
688+
.filter((end) => end !== undefined);
686689

687690
// undefined slot end will extend to max x
688-
const hasUndefinedEnd = ends.length > definedEnds.length;
691+
const hasUndefinedEnd = slotsPerLeader > definedEnds.length;
689692
const maxEnd = hasUndefinedEnd ? undefined : Math.max(...definedEnds);
690693

691694
groupTsDeltas[leaderSlot] = [minStart, maxEnd];

0 commit comments

Comments
 (0)