diff --git a/frontend/src/components/CommunitySwitch.vue b/frontend/src/components/CommunitySwitch.vue index 2c47dd08e..eda344c05 100644 --- a/frontend/src/components/CommunitySwitch.vue +++ b/frontend/src/components/CommunitySwitch.vue @@ -42,7 +42,7 @@ export default { }, setDefaultCommunity() { // when we already get an identifier via url we choose this if the community exist - if (this.communityIdentifier) { + if (this.communityIdentifier && this.communities.length >= 1) { const foundCommunity = this.communities.find((community) => { if ( community.uuid === this.communityIdentifier || @@ -82,6 +82,9 @@ export default { updated() { this.setDefaultCommunity() }, + mounted() { + this.setDefaultCommunity() + }, }