Fix builder save detection
This commit is contained in:
@@ -75,7 +75,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
this.abortRequests()
|
|
||||||
this.setDefaultValues()
|
this.setDefaultValues()
|
||||||
this.destroyEvents()
|
this.destroyEvents()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -898,7 +898,7 @@ export default {
|
|||||||
// Trigger browser dialog on page leave to prevent unsaved changes
|
// Trigger browser dialog on page leave to prevent unsaved changes
|
||||||
checkUnsavedBlocks (next, to = { query: {} }) {
|
checkUnsavedBlocks (next, to = { query: {} }) {
|
||||||
// Check if additional query params will be appended to url
|
// Check if additional query params will be appended to url
|
||||||
const queryParams = Object.keys(to.query).filter(key => key !== 'layoutID')
|
const queryParams = Object.keys(to.query).filter(key => key !== 'layoutID').length > 0
|
||||||
next(!this.unsavedBlocks.size || queryParams || window.confirm(this.$t('build.unsavedChanges')))
|
next(!this.unsavedBlocks.size || queryParams || window.confirm(this.$t('build.unsavedChanges')))
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user