From e775098da829b585c1a238f559be5261f3a91b72 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 20 Mar 2026 13:46:17 +0200 Subject: [PATCH] fix sw.js --- src/sw.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sw.js b/src/sw.js index bfe35d3c5..18c74cae8 100644 --- a/src/sw.js +++ b/src/sw.js @@ -8,6 +8,7 @@ import { storage } from 'src/lib/storage.js' import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js' import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js' import { cacheKey, emojiCacheKey, shouldCache } from 'src/services/sw/sw.js' +import { instanceDefaultConfig } from 'src/modules/default_config_state.js' // Collects all messages for service workers // Needed because service workers cannot use dynamic imports @@ -38,7 +39,8 @@ const setSettings = async () => { const locale = piniaState.prefsStorage.simple.interfaceLanguage || 'en' i18n.locale = locale const notificationsNativeArray = Object.entries( - piniaState.prefsStorage.simple.notificationNative, + piniaState.prefsStorage.simple.notificationNative || + instanceDefaultConfig.notificationNative, ) state.webPushAlwaysShowNotifications = piniaState.prefsStorage.simple.webPushAlwaysShowNotifications