diff options
-rw-r--r-- | src/store/fileUploadStore.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/store/fileUploadStore.js b/src/store/fileUploadStore.js index f094d9d2b..de0b5f5e6 100644 --- a/src/store/fileUploadStore.js +++ b/src/store/fileUploadStore.js @@ -220,6 +220,11 @@ const actions = { * @param {object} uploadId The unique uploadId */ discardUpload({ commit, state, getters }, uploadId) { + if (state.currentUploadId === uploadId) { + commit('setCurrentUploadId', undefined) + commit('showUploadEditor', false) + } + commit('discardUpload', { uploadId }) }, @@ -229,6 +234,11 @@ const actions = { * @param {object} uploadId The unique uploadId */ async uploadFiles({ commit, dispatch, state, getters }, uploadId) { + if (state.currentUploadId === uploadId) { + commit('setCurrentUploadId', undefined) + commit('showUploadEditor', false) + } + EventBus.$emit('uploadStart') // Tag the previously indexed files and add the temporary messages to the |