From e53382666a8371970fd11757c1956d984bdb4ba6 Mon Sep 17 00:00:00 2001 From: James George Date: Wed, 20 Mar 2024 20:29:04 +0530 Subject: [PATCH] fix(common): prevent exception with `ShortcodeListAdapter` initialization (#3917) --- packages/hoppscotch-common/src/components/share/index.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/hoppscotch-common/src/components/share/index.vue b/packages/hoppscotch-common/src/components/share/index.vue index 164318473..3a635f517 100644 --- a/packages/hoppscotch-common/src/components/share/index.vue +++ b/packages/hoppscotch-common/src/components/share/index.vue @@ -273,6 +273,10 @@ const loading = computed( ) onLoggedIn(() => { + if (adapter.isInitialized()) { + return + } + try { // wait for a bit to let the auth token to be set // because in some race conditions, the token is not set this fixes that