From 615b1ced95bc8d2abbfcb6c46701944c585f0281 Mon Sep 17 00:00:00 2001 From: skirtle <65301168+skirtles-code@users.noreply.github.com> Date: Sat, 10 Apr 2021 10:26:50 +0100 Subject: [PATCH] fix: banner bug, breaking search --- src/.vuepress/theme/layouts/Layout.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/.vuepress/theme/layouts/Layout.vue b/src/.vuepress/theme/layouts/Layout.vue index 5862e61c55..976a132d7f 100644 --- a/src/.vuepress/theme/layouts/Layout.vue +++ b/src/.vuepress/theme/layouts/Layout.vue @@ -134,18 +134,16 @@ export default { } }, - beforeMount() { - this.isBannerOpen = !localStorage.getItem(this.nameStorage) - }, - mounted() { this.$router.afterEach(() => { this.isSidebarOpen = false }) + this.isBannerOpen = !localStorage.getItem(this.nameStorage) + // Load component according to user preferences if (this.isBannerOpen) { - this.initBanner() + this.$nextTick(this.initBanner) } },