diff --git a/pages/marathon/_marathon.vue b/pages/marathon/_marathon.vue index 2e80b44b..c9ef71b9 100644 --- a/pages/marathon/_marathon.vue +++ b/pages/marathon/_marathon.vue @@ -16,8 +16,7 @@ export default Vue.extend({ data() { return { marathonId: this.$route.params.marathon, - // Show the sidebar by default on desktop-class devices - collapsed: (globalThis.innerWidth ?? 1024) < 1024, + collapsed: false, }; }, @@ -42,6 +41,11 @@ export default Vue.extend({ }, }, + mounted(): void { + // Show the sidebar by default on desktop-class devices + this.collapsed = (globalThis.innerWidth ?? 1024) < 1024; + }, + watch: { $route(to, from): void { // Detect when the path changes (not anchors in the same page or queries)