Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(nuxt): skip view transitions where there is no route change #22140

Merged
merged 2 commits into from
Jul 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: view transition in same page
  • Loading branch information
Jannchie committed Jul 14, 2023
commit cbb39a756a8212b0d66bb34c380ce5dbf95f849c
5 changes: 2 additions & 3 deletions packages/nuxt/src/app/plugins/view-transitions.client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 9,8 @@ export default defineNuxtPlugin((nuxtApp) => {

const router = useRouter()

router.beforeResolve((to) => {
if (to.meta.pageTransition === false) { return }

router.beforeResolve((to, from) => {
if (to.path === from.path || to.meta.pageTransition === false) { return }
danielroe marked this conversation as resolved.
Show resolved Hide resolved
const promise = new Promise<void>((resolve, reject) => {
finishTransition = resolve
abortTransition = reject
Expand Down
Loading