开启后端严格空值检查
This commit is contained in:
@@ -37,7 +37,9 @@ function loadScheduledJobsConfigFromFile() {
|
||||
export function normalizeScheduledJobsConfig(rawValue: unknown) {
|
||||
const source = isPlainObject(rawValue) ? rawValue : {}
|
||||
const rawJobs = Array.isArray(source.jobs) ? source.jobs : []
|
||||
const jobs = rawJobs.map((item) => normalizeScheduledJob(item)).filter(Boolean)
|
||||
const jobs = rawJobs
|
||||
.map((item) => normalizeScheduledJob(item))
|
||||
.filter((item): item is ReturnType<typeof normalizeCloudtentaclesHealthJob> => Boolean(item))
|
||||
const hasCloudtentaclesHealth = jobs.some((item) => item.id === CLOUDTENTACLES_HEALTH_JOB_ID)
|
||||
|
||||
if (!hasCloudtentaclesHealth) {
|
||||
|
||||
Reference in New Issue
Block a user