You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I found this specific bug that occurs using layouts and having pageTransition and layoutTransition enabled in nuxt config. Then, you navigate between layouts and the last page has a video and is fetching something with useFetch, then, you try to play the video. The script loads, but the video doesn't play.
Steps to reproduce: (It is recommended to open the preview in a new tab)
Hello again @harlan-zw ,
I discovered that this error is caused because onMounted is being executed twice. You will notice it by logging something to the console
I also noticed that it is not related to useFetch at all, it is related to awaiting for async functions in general.
It seems that this happens because of a bug with Vue.
🐛 The bug
Hi, I found this specific bug that occurs using layouts and having
pageTransition
andlayoutTransition
enabled in nuxt config. Then, you navigate between layouts and the last page has a video and is fetching something withuseFetch
, then, you try to play the video. The script loads, but the video doesn't play./
Go to Layout
🛠️ To reproduce
https://stackblitz.com/edit/nuxt-starter-aqvq3n
🌈 Expected behavior
The video in /video should be played after clicking it
ℹ️ Additional context
nuxt: 3.13.2
@nuxt/scripts: 0.9.4
Btw: this error doesn't occur if you enclose the script with
<ClientOnly>
The text was updated successfully, but these errors were encountered: