Skip to content

Commit

Permalink
fix: scheduledTasks can be undefined (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
noook committed Mar 21, 2024
1 parent 818e206 commit 7044c47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/devtools/src/server-rpc/server-tasks.ts
Expand Up @@ -38,7 +38,7 @@ export function setupServerTasksRPC({ nuxt, refresh }: NuxtDevtoolsServerContext
}
return {
tasks: nitro.options.tasks,
scheduledTasks: Object.entries(nitro.options.scheduledTasks)
scheduledTasks: Object.entries(nitro.options.scheduledTasks ?? {})
.reduce<Record<string, string[]>>((acc, [cron, tasks]) => {
acc[cron] = Array.isArray(tasks) ? tasks : [tasks]
return acc
Expand Down

0 comments on commit 7044c47

Please sign in to comment.