Skip to content

Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia

Don't update BackendUserInfo if not authenticated

Andrew Bastindda40537cc14
diff --git a/helpers/teams/BackendUserInfo.ts b/helpers/teams/BackendUserInfo.ts
index 2c42d1398..8392e6f59 100644
--- a/helpers/teams/BackendUserInfo.ts
+++ b/helpers/teams/BackendUserInfo.ts
@@ -43,7 +43,7 @@ export const currentUserInfo$ = new BehaviorSubject<UserInfo | null>(null)
* Initializes the currenUserInfo$ view and sets up its update mechanism
*/
export async function initUserInfo() {
- await updateUserInfo()
+ if (fb.idToken) await updateUserInfo()
fb.idToken$.subscribe((token) => {
if (token) {