Make the frontend config work somewhat even without DB config

This commit is contained in:
Ekaterina Vaartis 2023-12-21 00:48:14 +03:00
commit bfdad56b0d
4 changed files with 19 additions and 9 deletions

View file

@ -195,7 +195,8 @@ export default {
}
},
canHardReset () {
return this.realSource === 'admin' && this.$store.state.adminSettings.modifiedPaths.has(this.canonPath.join(' -> '))
return this.realSource === 'admin' && this.$store.state.adminSettings.modifiedPaths &&
this.$store.state.adminSettings.modifiedPaths.has(this.canonPath.join(' -> '))
},
matchesExpertLevel () {
return (this.expert || 0) <= this.$store.state.config.expertLevel > 0