diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 2eca5b7b..a6ad3104 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -1,4 +1,4 @@ -import { reactive, inject, markRaw, nextTick, readonly } from 'vue' +import { reactive, inject, markRaw, readonly } from 'vue' import type { Component, InjectionKey } from 'vue' import { PageData } from '../shared' import { inBrowser, withBase } from './utils' @@ -89,7 +89,7 @@ export function createRouter( : (readonly(JSON.parse(__pageData)) as PageData) if (inBrowser) { - nextTick(() => { + setTimeout(() => { if (targetLoc.hash && !scrollPosition) { let target: HTMLElement | null = null try {