Skip to content

Commit 77a681b

Browse files
committed
Fix timeline breaking on undefined aura log
1 parent 704d2af commit 77a681b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

ui/core/components/detailed_results/timeline.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -576,10 +576,9 @@ export class Timeline extends ResultComponent {
576576
const buffsAndDebuffsById = buffsById.concat(debuffsById);
577577

578578
auraAsResource.forEach(auraId => {
579-
const auraIndex = buffsById.findIndex(auraUptimeLogs => auraUptimeLogs[0].actionId!.spellId === auraId);
579+
const auraIndex = buffsById.findIndex(auraUptimeLogs => auraUptimeLogs?.[0].actionId!.spellId === auraId);
580580
if (auraIndex !== -1) {
581581
this.addAuraRow(buffsById[auraIndex], duration);
582-
delete buffsById[auraIndex];
583582
}
584583
});
585584

@@ -610,9 +609,11 @@ export class Timeline extends ResultComponent {
610609
});
611610
}
612611

613-
// Don't add a row for buffs that were already visualized in a cast row.
612+
// Don't add a row for buffs that were already visualized in a cast row or are prioritized.
614613
const buffsToShow = buffsById.filter(auraUptimeLogs =>
615-
playerCastsByAbility.findIndex(casts => casts[0].actionId!.equalsIgnoringTag(auraUptimeLogs[0].actionId!)),
614+
playerCastsByAbility.findIndex(
615+
casts => auraUptimeLogs[0].actionId && (casts[0].actionId!.equalsIgnoringTag(auraUptimeLogs[0].actionId) || auraAsResource.includes(auraUptimeLogs[0].actionId.anyId())),
616+
),
616617
);
617618
if (buffsToShow.length > 0) {
618619
this.addSeparatorRow(duration);

0 commit comments

Comments
 (0)