Skip to content

Commit 01c5466

Browse files
committed
Only navigate after mount. This allows us to build the site
1 parent bc4211d commit 01c5466

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

‎docs/app/pages/[...slug].vue‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ defineOgImageComponent('Docs', {
9999
headline: headline.value
100100
})
101101
102-
if (page.value?.redirect) {
103-
navigateTo(page.value?.redirect)
104-
}
105-
106102
const links = computed(() => {
107103
const links = []
108104
if (toc?.bottom?.edit) {
@@ -116,4 +112,10 @@ const links = computed(() => {
116112
117113
return [...links, ...(toc?.bottom?.links || [])].filter(Boolean)
118114
})
115+
116+
onMounted(() => {
117+
if (page.value?.redirect) {
118+
navigateTo(page.value?.redirect)
119+
}
120+
})
119121
</script>

0 commit comments

Comments
 (0)