From 41da52d6edfbd7c58aae16ac51901c25e96cc91a Mon Sep 17 00:00:00 2001 From: Leo Liu Junyi <68986725+torqueJY32@users.noreply.github.com> Date: Wed, 31 Jul 2024 12:07:31 +0800 Subject: [PATCH] Fix Switch state inconsistency for Scheduled Trigger (#2221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 修复定时关闭时Switch显示不同步 * 优化写法 --- projects/app/src/components/core/app/ScheduledTriggerConfig.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx b/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx index 52c6826118a..eef55dde7c3 100644 --- a/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx +++ b/projects/app/src/components/core/app/ScheduledTriggerConfig.tsx @@ -187,7 +187,7 @@ const ScheduledTriggerConfig = ({ cronField: [CronJobTypeEnum.interval, 24 / cronField.hour.length, 0] }; }, [cronString]); - const isOpenSchedule = cronConfig?.isOpen; + const isOpenSchedule = cronConfig?.isOpen ?? false; const cronField = (cronConfig?.cronField || defaultValue) as CronFieldType; const cronConfig2cronString = useCallback(