Skip to content

Commit

Permalink
⚡ If only 1 section set, then expand on load
Browse files Browse the repository at this point in the history
  • Loading branch information
Lissy93 committed Oct 10, 2021
1 parent e971a0b commit 5fe7971
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Workspace/SideBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ export default {
},
},
mounted() {
this.openDefaultSection();
if (this.sections.length === 1) { // If only 1 section, go ahead and open it
this.openSection(0);
} else { // Otherwise, see if user set a default section, and open that
this.openDefaultSection();
}
},
};
</script>
Expand Down

0 comments on commit 5fe7971

Please sign in to comment.