From e6fee11305c24ea97fccaabee489cd32c4709077 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com> Date: Tue, 11 Mar 2025 16:04:02 +0530 Subject: [PATCH] fix: persist active workspace selection This is observed particularly in the cloud offering. The proposed changes ensure the relevant login state is confirmed before the network call, maintaining backwards compatibility with SH. --- .../hoppscotch-common/src/helpers/teams/TeamListAdapter.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/hoppscotch-common/src/helpers/teams/TeamListAdapter.ts b/packages/hoppscotch-common/src/helpers/teams/TeamListAdapter.ts index 0a303b25..e39cc71a 100644 --- a/packages/hoppscotch-common/src/helpers/teams/TeamListAdapter.ts +++ b/packages/hoppscotch-common/src/helpers/teams/TeamListAdapter.ts @@ -65,6 +65,12 @@ export default class TeamListAdapter { this.loading$.next(true) + const probableUser = platform.auth.getProbableUser() + + if (probableUser !== null) { + await platform.auth.waitProbableLoginToConfirm() + } + const results: GetMyTeamsQuery["myTeams"] = [] while (true) {