3
0

Fix builder save detection

This commit is contained in:
Jože Fortun 2023-08-23 11:06:52 +02:00
parent 95a1efc657
commit 37b027391c
2 changed files with 1 additions and 2 deletions

View File

@ -75,7 +75,6 @@ export default {
},
beforeDestroy () {
this.abortRequests()
this.setDefaultValues()
this.destroyEvents()
},

View File

@ -898,7 +898,7 @@ export default {
// Trigger browser dialog on page leave to prevent unsaved changes
checkUnsavedBlocks (next, to = { query: {} }) {
// 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')))
},