From 75e2199cb52fc541197d3b58ca6070f3112a03d3 Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Tue, 19 Dec 2023 11:57:19 +0530 Subject: [PATCH] fix: pick the corresponding REST collections to export from personal/team workspace --- .../src/components/collections/ImportExport.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/hoppscotch-common/src/components/collections/ImportExport.vue b/packages/hoppscotch-common/src/components/collections/ImportExport.vue index 120dcc245..64ae1d361 100644 --- a/packages/hoppscotch-common/src/components/collections/ImportExport.vue +++ b/packages/hoppscotch-common/src/components/collections/ImportExport.vue @@ -482,10 +482,6 @@ const HoppGistCollectionsExporter: ImporterOrExporter = { isLoading: isHoppGistCollectionExporterInProgress, }, action: async () => { - if (!myCollections.value.length) { - return toast.error(t("error.no_collections_to_export")) - } - isHoppGistCollectionExporterInProgress.value = true const collectionJSON = await getCollectionJSON() @@ -498,6 +494,11 @@ const HoppGistCollectionsExporter: ImporterOrExporter = { } if (E.isRight(collectionJSON)) { + if (!JSON.parse(collectionJSON.right).length) { + isHoppGistCollectionExporterInProgress.value = false + return toast.error(t("error.no_collections_to_export")) + } + const res = await gistExporter(collectionJSON.right, accessToken) if (E.isLeft(res)) {