From f98c1a5997123109c6afbe1db6e0c2ad4a9ca305 Mon Sep 17 00:00:00 2001 From: Broque Thomas <26755000+Nezreka@users.noreply.github.com> Date: Mon, 25 May 2026 15:12:31 -0700 Subject: [PATCH] Fix Auto-Sync modal 'total is not defined' regression Refactor introduced when adding the history filter dropped the `const total = _autoSyncScheduleState.runHistoryTotal || 0;` line at the top of populateAutoSyncHistoryList, but line 705's load-more footer still referenced `total`. ReferenceError bubbled to the refresh-modal catch and the modal rendered the generic 'Could not load schedule data' error state instead of the schedule board. --- webui/static/auto-sync.js | 1 + 1 file changed, 1 insertion(+) diff --git a/webui/static/auto-sync.js b/webui/static/auto-sync.js index 48d897cd..fcd6e2ef 100644 --- a/webui/static/auto-sync.js +++ b/webui/static/auto-sync.js @@ -670,6 +670,7 @@ function populateAutoSyncHistoryList(root = document) { const list = root.querySelector('.auto-sync-history-list'); if (!list) return; const allHistory = Array.isArray(_autoSyncScheduleState.runHistory) ? _autoSyncScheduleState.runHistory : []; + const total = _autoSyncScheduleState.runHistoryTotal || 0; const filter = _autoSyncHistoryFilter || 'all'; const history = allHistory.filter(h => { if (filter === 'error') return h.status === 'error' || h.status === 'skipped';