Update routine summary and effect handling

This commit is contained in:
2026-04-14 23:43:09 +02:00
parent 9b73968ec4
commit e40903e798

View File

@@ -109,7 +109,11 @@ function getRoutineSummary(
summaryParts.push(formatControlEffectValue(pathEffect));
}
} else {
summaryParts.push(formatControlEffectValue(routine.effects[0]!));
const effect = heldSteps[0];
if (effect?.type === "controlEffect") {
summaryParts.push(formatControlEffectValue(effect.effect));
}
}
summaryParts.push(`P${routine.priority}`);
@@ -128,7 +132,8 @@ function isRoutineEffectInactive(
);
}
const effect = routine.effects[0];
const effect =
heldSteps[0]?.type === "controlEffect" ? heldSteps[0].effect : undefined;
if (effect === undefined) {
return false;