From 9925674c16067586c25b244f7ac8259d837b23ec Mon Sep 17 00:00:00 2001 From: korelstar Date: Sat, 20 Apr 2019 10:12:48 +0200 Subject: [PATCH] AppSidebar. fix error when no tabs (#359) There was an error when a `AppSidebar` doesn't contain any `AppSidebarTab`s and uses just the content directly. See https://github.com/nextcloud/nextcloud-vue/pull/340#issuecomment-484798872 --- src/components/AppSidebar/AppSidebar.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/AppSidebar/AppSidebar.vue b/src/components/AppSidebar/AppSidebar.vue index 6862ba7251..c617d30ff8 100644 --- a/src/components/AppSidebar/AppSidebar.vue +++ b/src/components/AppSidebar/AppSidebar.vue @@ -167,8 +167,10 @@ export default { return tabs }, []) - // init active tab - this.updateActive() + // init active tab if exists + if (this.tabs.length > 0) { + this.updateActive() + } }, methods: { closeSidebar() {