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.
This commit is contained in:
parent
d18f45dfec
commit
f98c1a5997
1 changed files with 1 additions and 0 deletions
|
|
@ -670,6 +670,7 @@ function populateAutoSyncHistoryList(root = document) {
|
||||||
const list = root.querySelector('.auto-sync-history-list');
|
const list = root.querySelector('.auto-sync-history-list');
|
||||||
if (!list) return;
|
if (!list) return;
|
||||||
const allHistory = Array.isArray(_autoSyncScheduleState.runHistory) ? _autoSyncScheduleState.runHistory : [];
|
const allHistory = Array.isArray(_autoSyncScheduleState.runHistory) ? _autoSyncScheduleState.runHistory : [];
|
||||||
|
const total = _autoSyncScheduleState.runHistoryTotal || 0;
|
||||||
const filter = _autoSyncHistoryFilter || 'all';
|
const filter = _autoSyncHistoryFilter || 'all';
|
||||||
const history = allHistory.filter(h => {
|
const history = allHistory.filter(h => {
|
||||||
if (filter === 'error') return h.status === 'error' || h.status === 'skipped';
|
if (filter === 'error') return h.status === 'error' || h.status === 'skipped';
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue