Commit d3b4c645 authored by NGPixel's avatar NGPixel

fix: save timeout failsafe

parent 21f19d3a
......@@ -232,6 +232,11 @@ export default {
async save({ rethrow = false, overwrite = false } = {}) {
this.showProgressDialog('saving')
this.isSaving = true
const saveTimeoutHandle = setTimeout(() => {
throw new Error('Save operation timed out.')
}, 30000)
try {
if (this.$store.get('editor/mode') === 'create') {
// --------------------------------------------
......@@ -338,9 +343,13 @@ export default {
icon: 'warning'
})
if (rethrow === true) {
clearTimeout(saveTimeoutHandle)
this.isSaving = false
this.hideProgressDialog()
throw err
}
}
clearTimeout(saveTimeoutHandle)
this.isSaving = false
this.hideProgressDialog()
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment