diff --git a/src/cron/store.ts b/src/cron/store.ts index 57554af8f9f..b0c9aa1c168 100644 --- a/src/cron/store.ts +++ b/src/cron/store.ts @@ -86,9 +86,10 @@ async function loadStateFile(statePath: string): Promise { } } -function hasInlineState(jobs: Array>): boolean { +function hasInlineState(jobs: Array | null | undefined>): boolean { return jobs.some( (job) => + job != null && job.state !== undefined && typeof job.state === "object" && job.state !== null &&