Skip to content

Commit

Permalink
Improved: logic to initialize firebase only if notificationPrefs are …
Browse files Browse the repository at this point in the history
…enabled
  • Loading branch information
amansinghbais committed Jul 10, 2024
1 parent 6fadf43 commit ec896a4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/DxpLogin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ async function handleUserFlow(token: string, oms: string, expirationTime: string
const appState = appContext.config.globalProperties.$store
await userStore.setLocale(appState.getters['user/getUserProfile'].userLocale)
const allNotificationPrefs = appState.getters['user/getAllNotificationPrefs']
// check if firebase configurations are there
if (notificationContext.appFirebaseConfig && notificationContext.appFirebaseConfig.apiKey) {
if (notificationContext.appFirebaseConfig && notificationContext.appFirebaseConfig.apiKey && allNotificationPrefs.length) {
// initialising and connecting firebase app for notification support
await initialiseFirebaseApp(
notificationContext.appFirebaseConfig,
Expand Down

0 comments on commit ec896a4

Please sign in to comment.