Fix duplicate calls on init()
All checks were successful
Deploy Spot / deploy (push) Successful in 34s
All checks were successful
Deploy Spot / deploy (push) Successful in 34s
This commit is contained in:
@@ -65,7 +65,7 @@ export default {
|
|||||||
if(sNewBaseMap && this.map.getLayer(sNewBaseMap)) this.map.setLayoutProperty(sNewBaseMap, 'visibility', 'visible');
|
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) {
|
if(newProjectCodename != oldProjectCodename) {
|
||||||
this.hash.items = [newProjectCodename];
|
this.hash.items = [newProjectCodename];
|
||||||
this.settings.toggle(false, 0);
|
this.settings.toggle(false, 0);
|
||||||
@@ -85,13 +85,12 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['api', 'lang', 'hash', 'projects', 'user', 'consts', 'isMobile'],
|
inject: ['api', 'lang', 'hash', 'projects', 'user', 'consts', 'isMobile'],
|
||||||
beforeMount() {
|
mounted() {
|
||||||
|
//Starts default project init() through watcher
|
||||||
if(this.hash.items.length == 0) {
|
if(this.hash.items.length == 0) {
|
||||||
this.hash.items[0] = (this.projects.getDefaultProject().mode == this.consts.modes.blog)?this.projects.getDefaultCodeName():this.overview.codename;
|
this.hash.items[0] = (this.projects.getDefaultProject().mode == this.consts.modes.blog)?this.projects.getDefaultCodeName():this.overview.codename;
|
||||||
}
|
}
|
||||||
},
|
else this.init();
|
||||||
mounted() {
|
|
||||||
this.init();
|
|
||||||
},
|
},
|
||||||
beforeUnmount() {
|
beforeUnmount() {
|
||||||
this.quit();
|
this.quit();
|
||||||
|
|||||||
Reference in New Issue
Block a user