feat: alert the user on empty collection/environment exports (#3416)

This commit is contained in:
James George
2023-10-05 02:08:38 -07:00
committed by GitHub
parent 87d617012f
commit ae89af9978
4 changed files with 22 additions and 0 deletions

View File

@@ -1938,6 +1938,12 @@ const exportJSONCollection = async () => {
await getJSONCollection()
const parsedCollections = JSON.parse(collectionJSON.value)
if (!parsedCollections.length) {
return toast.error(t("error.no_collections_to_export"))
}
initializeDownloadCollection(collectionJSON.value, null)
}