Prevent empty timer patterns
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s
All checks were successful
Deploy Sokko G / deploy (push) Successful in 7s
This commit is contained in:
parent
828532bcc4
commit
3e16ea278d
1 changed files with 1 additions and 1 deletions
|
|
@ -208,7 +208,7 @@ export function TimerModule({ toolboxId, moduleId, context }) {
|
||||||
if (time && targetAt) countdown = { id: context.uid("timer"), label, type, time, targetAt };
|
if (time && targetAt) countdown = { id: context.uid("timer"), label, type, time, targetAt };
|
||||||
}
|
}
|
||||||
if (type === "time_pattern") {
|
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 (pattern && getTimePatternTargetMs(pattern, now)) countdown = { id: context.uid("timer"), label, type, pattern };
|
||||||
}
|
}
|
||||||
if (type === "interval") {
|
if (type === "interval") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue