Skip to content

Commit fb2aa9c

Browse files
committed
fix
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 4bfe701 commit fb2aa9c

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

ui/src/components/header/ProjectMenu.vue

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ export default {
4141
},
4242
data () {
4343
return {
44-
selectedProjectId: 0,
44+
selectedProjectId: null,
4545
loading: false
4646
}
4747
},
4848
created () {
49-
if (this.$store.getters?.project?.id) {
50-
this.selectedProjectId = this.$store.getters.project.id
51-
this.$store.dispatch('ToggleTheme', this.selectedProjectId ? 'dark' : 'light')
52-
}
49+
this.selectedProjectId = this.$store.getters?.project?.id || this.defaultOption.id
50+
this.$store.dispatch('ToggleTheme', this.selectedProjectId ? 'dark' : 'light')
5351
},
5452
computed: {
5553
isDisabled () {

0 commit comments

Comments
 (0)