Skip to content

Commit

Permalink
Merge pull request #174 from k2maan/fixFirebaseConfigError
Browse files Browse the repository at this point in the history
Fixed: firebase error on login if app is not configured for notifications support
  • Loading branch information
ravilodhi authored Sep 22, 2023
2 parents 48ad689 + 60cc38c commit 2712314
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/components/Login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,16 @@ export default defineComponent({
try {
await context.login({ token, oms })

// initialising and connecting firebase app for notification support
await initialiseFirebaseApp(
noitificationContext.appFirebaseConfig,
noitificationContext.appFirebaseVapidKey,
noitificationContext.storeClientRegistrationToken,
noitificationContext.addNotification,
)
// check if firebase configurations are there
if (noitificationContext.appFirebaseConfig) {
// initialising and connecting firebase app for notification support
await initialiseFirebaseApp(
noitificationContext.appFirebaseConfig,
noitificationContext.appFirebaseVapidKey,
noitificationContext.storeClientRegistrationToken,
noitificationContext.addNotification,
)
}

this.router.push('/')
} catch (error) {
Expand Down

0 comments on commit 2712314

Please sign in to comment.