Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions web-app/packages/lib/src/modules/project/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,9 @@ export const useProjectStore = defineStore('projectModule', {

async downloadArchive(payload: DownloadPayload) {
const notificationStore = useNotificationStore()
this.cancelDownloadArchive()
await this.cancelDownloadArchive()
this.projectDownloadingVersion = payload.versionId
this.projectDownloading = true
if (payload.versionId) {
this.projectDownloadingVersion = payload.versionId
}

const errorMessage =
'Failed to download project archive. Please try again later.'
Expand All @@ -728,7 +726,7 @@ export const useProjectStore = defineStore('projectModule', {
text: exceedMessage,
life: 6000
})
this.cancelDownloadArchive()
await this.cancelDownloadArchive()
return
}

Expand Down Expand Up @@ -765,7 +763,7 @@ export const useProjectStore = defineStore('projectModule', {
pollDownloadArchive()
},

cancelDownloadArchive() {
async cancelDownloadArchive() {
if (downloadArchiveTimeout) {
clearTimeout(downloadArchiveTimeout)
downloadArchiveTimeout = null
Expand Down
Loading