Fix duplicate calls on init()
All checks were successful
Deploy Spot / deploy (push) Successful in 34s

This commit is contained in:
2026-05-28 14:21:42 +02:00
parent fdd0ada815
commit 520df5b570

View File

@@ -65,7 +65,7 @@ export default {
if(sNewBaseMap && this.map.getLayer(sNewBaseMap)) this.map.setLayoutProperty(sNewBaseMap, 'visibility', 'visible');
}
},
'hash.items.0'(newProjectCodename, oldProjectCodename) {
'hash.items.0'(newProjectCodename, oldProjectCodename) { //hash.items.0 = Project Code Name
if(newProjectCodename != oldProjectCodename) {
this.hash.items = [newProjectCodename];
this.settings.toggle(false, 0);
@@ -85,13 +85,12 @@ export default {
};
},
inject: ['api', 'lang', 'hash', 'projects', 'user', 'consts', 'isMobile'],
beforeMount() {
mounted() {
//Starts default project init() through watcher
if(this.hash.items.length == 0) {
this.hash.items[0] = (this.projects.getDefaultProject().mode == this.consts.modes.blog)?this.projects.getDefaultCodeName():this.overview.codename;
}
},
mounted() {
this.init();
else this.init();
},
beforeUnmount() {
this.quit();