Fix Switch state inconsistency for Scheduled Trigger (#2221)

* 修复定时关闭时Switch显示不同步

* 优化写法
This commit is contained in:
Leo Liu Junyi
2024-07-31 12:07:31 +08:00
committed by GitHub
parent 446d9cb1b9
commit 41da52d6ed

View File

@@ -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(