Skip to content
Snippets Groups Projects
Commit 3bdddb0b authored by Cliff Li's avatar Cliff Li
Browse files

Fix some pages not accessible

parent 49bac2ef
No related branches found
No related tags found
1 merge request!40Components
......@@ -16,6 +16,7 @@ export default class Layout {
checkLogin();
this.setTabs();
this.selectedTabIndex = 0;
this.lastTabIndex = this.selectedTabIndex;
this.wasLoggedIn = isLoggedIn();
}
......@@ -57,8 +58,11 @@ export default class Layout {
onupdate() {
if (this.wasLoggedIn !== isLoggedIn()) this.selectedTabIndex = 0;
this.wasLoggedIn = isLoggedIn();
if (this.lastTabIndex !== this.selectedTabIndex) {
this.lastTabIndex = this.selectedTabIndex;
this.selectTab(this.selectedTabIndex);
}
this.setTabs();
this.selectTab(this.selectedTabIndex);
}
view(vnode) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment