diff --git a/frontend/src/views/Dashboard.vue b/frontend/src/views/Dashboard.vue index ae94e90..b610032 100644 --- a/frontend/src/views/Dashboard.vue +++ b/frontend/src/views/Dashboard.vue @@ -354,10 +354,11 @@ let refreshInterval = null const stats = computed(() => downloadsStore.stats) const recentActivity = computed(() => downloadsStore.recentActivity) -// Read threshold from settings, default 5 if unset -const failureThreshold = computed(() => - settingsStore.settings['dashboard.failure_threshold'] ?? 5 -) +// Read threshold from settings, default 5 if unset or invalid +const failureThreshold = computed(() => { + const n = Number(settingsStore.settings['dashboard.failure_threshold']) + return Number.isFinite(n) && n >= 1 ? n : 5 +}) // Per-platform health for platforms with ≥1 enabled source const platformHealth = computed(() => {