diff --git a/plugins/events.client.ts b/plugins/events.client.ts index 043911d9..819dec89 100644 --- a/plugins/events.client.ts +++ b/plugins/events.client.ts @@ -92,10 +92,10 @@ export default defineNuxtPlugin(() => { } const getAll = () => { - getEventsAll().then((events: ServerEvent[]) => { - if (events.length) { - eventsStore.initialize(events); - cachedIdsStore.syncWithActive(events.map(({ uuid }) => uuid)); + getEventsAll().then((eventsList: ServerEvent[]) => { + if (eventsList.length) { + eventsStore.initialize(eventsList); + cachedIdsStore.syncWithActive(eventsList.map(({ uuid }) => uuid)); } else { // NOTE: clear cached events hardly eventsStore.removeAll();