Filter out schedules that are missing their settings

This commit is contained in:
Matt Isenhower
2024-09-12 09:56:23 -07:00
parent d7d6c57d43
commit e0585bebcb

View File

@@ -25,7 +25,7 @@ function defineScheduleStore(id, options) {
};
const time = useTimeStore();
const schedules = computed(() => options.nodes()?.map(n => transform(n)));
const schedules = computed(() => options.nodes()?.map(n => transform(n)).filter(s => s.settings));
const currentSchedules = computed(() => schedules.value?.filter(s => time.isCurrent(s.endTime)));
const activeSchedule = computed(() => schedules.value?.find(s => time.isActive(s.startTime, s.endTime)));