vue-router
vue-router copied to clipboard
"onBeforeRouteLeave" guard is not removed after switching to another view when using keep-alive and composables api
Version
3.6.5
Reproduction link
Steps to reproduce
- Clone the Github repo
- Run 'npm install'
- Run 'npm run dev' and open the broswer
- Click the first link
- Click the second link
- Click the first link one more time
What is expected?
The window alert "onBeforeRouteLeave" only once after step 5
What is actually happening?
- The window alert "onBeforeRouteLeave" after step 5
- The window alert "onBeforeRouteLeave" after step 6
This bug only appears when using keep-alive and composables api.
Hello is it possible to work on this issue?