diff --git a/frontend/src/components/home/UpdateNotification.vue b/frontend/src/components/home/UpdateNotification.vue index 6eb01c9b0..a4685ab5d 100644 --- a/frontend/src/components/home/UpdateNotification.vue +++ b/frontend/src/components/home/UpdateNotification.vue @@ -23,7 +23,7 @@ import {useBaseStore} from '@/stores/base' const baseStore = useBaseStore() const updateAvailable = computed(() => baseStore.updateAvailable) -const registration = ref(null) +const registration = ref(null) const refreshing = ref(false) document.addEventListener('swUpdated', showRefreshUI, {once: true}) @@ -38,7 +38,8 @@ navigator?.serviceWorker?.addEventListener( function showRefreshUI(e: Event) { console.log('recieved refresh event', e) - registration.value = e.detail + const customEvent = e as CustomEvent + registration.value = customEvent.detail baseStore.setUpdateAvailable(true) }