diff --git a/athena/Objectives.tsx b/athena/Objectives.tsx index 330c9b73..43955244 100644 --- a/athena/Objectives.tsx +++ b/athena/Objectives.tsx @@ -923,26 +923,26 @@ export function getHiddenLabels(objectives: Objectives): PlayerIDSet | null { return null; } - let labels: Set | null = null; + const labels: Array = []; + const visibleLabels = new Set(); for (const [, objective] of objectives) { - if ( - objective.hidden && - objectiveHasLabel(objective) && - objective.label && - (!objective.optional || - !objective.completed || - objective.completed.size < 1) - ) { + if (objectiveHasLabel(objective) && objective.label) { for (const label of objective.label) { - if (!labels) { - labels = new Set(); + if ( + objective.hidden && + (!objective.optional || + !objective.completed || + objective.completed.size < 1) + ) { + labels.push(label); + } else { + visibleLabels.add(label); } - - labels.add(label); } } } - return labels; + const hiddenLabels = labels.filter((label) => !visibleLabels.has(label)); + return hiddenLabels.length ? new Set(hiddenLabels) : null; } export function getInitialObjective( diff --git a/hera/editor/lib/ObjectiveCard.tsx b/hera/editor/lib/ObjectiveCard.tsx index 9925875e..79f33d59 100644 --- a/hera/editor/lib/ObjectiveCard.tsx +++ b/hera/editor/lib/ObjectiveCard.tsx @@ -267,9 +267,9 @@ export default function ObjectiveCard({ )} - -