diff --git a/frontend_nuxt/pages/posts/[id]/index.vue b/frontend_nuxt/pages/posts/[id]/index.vue index b117e6e20..45f4e9bbe 100644 --- a/frontend_nuxt/pages/posts/[id]/index.vue +++ b/frontend_nuxt/pages/posts/[id]/index.vue @@ -876,12 +876,7 @@ const gotoProfile = () => { navigateTo(`/users/${author.value.id}`, { replace: true }) } -onActivated(async () => { - await refreshPost() - await fetchComments() -}) - -onMounted(async () => { +const initPage = async () => { await fetchComments() const hash = location.hash const id = hash.startsWith('#comment-') ? hash.substring('#comment-'.length) : null @@ -889,6 +884,14 @@ onMounted(async () => { updateCurrentIndex() window.addEventListener('scroll', updateCurrentIndex) jumpToHashComment() +} + +onActivated(async () => { + await initPage() +}) + +onMounted(async () => { + await initPage() })