mirror of
https://github.com/nuxt/nuxt.git
synced 2025-03-03 23:14:42 +00:00
fix(nuxt): skip view transitions where there is no route change (#22140)
This commit is contained in:
parent
a07cfb8663
commit
988e75bbc7
@ -9,9 +9,10 @@ export default defineNuxtPlugin((nuxtApp) => {
|
||||
|
||||
const router = useRouter()
|
||||
|
||||
router.beforeResolve((to) => {
|
||||
if (to.meta.pageTransition === false) { return }
|
||||
|
||||
router.beforeResolve((to, from) => {
|
||||
if (to === from || to.matched.every((comp, index) => comp.components && comp.components?.default === from.matched[index]?.components?.default)) {
|
||||
return
|
||||
}
|
||||
const promise = new Promise<void>((resolve, reject) => {
|
||||
finishTransition = resolve
|
||||
abortTransition = reject
|
||||
|
Loading…
Reference in New Issue
Block a user