diff --git a/src/Frontend/src/components/audit/AuditList.vue b/src/Frontend/src/components/audit/AuditList.vue index 851c973f29..ec1645f2a8 100644 --- a/src/Frontend/src/components/audit/AuditList.vue +++ b/src/Frontend/src/components/audit/AuditList.vue @@ -63,8 +63,11 @@ onBeforeMount(() => { //without setTimeout, this happens before the store is properly initialised, and therefore the query route values aren't applied to the refresh setTimeout(async () => { - await Promise.all([refreshNow(), store.loadEndpoints()]); - firstLoad.value = false; + try { + await Promise.all([refreshNow(), store.loadEndpoints()]); + } finally { + firstLoad.value = false; + } }, 0); }); diff --git a/src/Frontend/src/composables/autoRefresh.ts b/src/Frontend/src/composables/autoRefresh.ts index 23150f3323..64b233ad29 100644 --- a/src/Frontend/src/composables/autoRefresh.ts +++ b/src/Frontend/src/composables/autoRefresh.ts @@ -11,8 +11,11 @@ export default function useFetchWithAutoRefresh(name: string, fetchFn: () => Pro return; } isRefreshing.value = true; - await fetchFn(); - isRefreshing.value = false; + try { + await fetchFn(); + } finally { + isRefreshing.value = false; + } }; const { isActive, pause, resume } = useTimeoutPoll( fetchWrapper,