Prevent empty timer patterns
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s

This commit is contained in:
Shinuwa 2026-08-03 16:09:32 +02:00
parent 828532bcc4
commit 3e16ea278d

View file

@ -208,7 +208,7 @@ export function TimerModule({ toolboxId, moduleId, context }) {
if (time && targetAt) countdown = { id: context.uid("timer"), label, type, time, targetAt };
}
if (type === "time_pattern") {
const pattern = timePartsToString(draft.pattern, { allowWildcard: true });
const pattern = hasTimePartValue(draft.pattern) ? timePartsToString(draft.pattern, { allowWildcard: true }) : "";
if (pattern && getTimePatternTargetMs(pattern, now)) countdown = { id: context.uid("timer"), label, type, pattern };
}
if (type === "interval") {