From 05315cc88af36cf1e43f78ad43b93c456ce75c98 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Sun, 15 Feb 2026 21:57:07 -0500 Subject: [PATCH] fix: Replace unsafe date formatting in SchedulesView with safeDate() Replace `new Date(x).toLocaleString()` pattern with `safeDate()` utility to prevent crashes on null/undefined timestamps in scheduled task next_run field. Part of ongoing safe formatter migration across all Vue views. Co-Authored-By: Claude Opus 4.6 --- frontend/src/views/admin/SchedulesView.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/admin/SchedulesView.vue b/frontend/src/views/admin/SchedulesView.vue index d62efed..b813d46 100644 --- a/frontend/src/views/admin/SchedulesView.vue +++ b/frontend/src/views/admin/SchedulesView.vue @@ -2,6 +2,7 @@ import { ref, onMounted } from 'vue' import { useApi } from '@/composables/useApi' import { Clock, Plus, Edit, Trash2, Power, Loader2 } from 'lucide-vue-next' +import { safeDate } from '@/utils/formatters' interface ScheduledTask { id: string @@ -142,7 +143,7 @@ onMounted(() => { {{ task.task_type.replace('_', ' ') }} {{ task.cron_expression }} {{ task.timezone }} - {{ task.next_run ? new Date(task.next_run).toLocaleString() : '—' }} + {{ safeDate(task.next_run, '—') }}