If I prevent a route change with routeBeforeUpdate
method (as on vue-router spec) it seems asyncData
for the new route (that has not been shown) is still called.
It looks as though routeBeforeLeave
works fine, but as I need to prevent a route change when a slug/prop of a URL changes I need to use routeBeforeUpdate
.
Is there a simple check that can be put in place to make sure the new route is definitely going to be shown before asyncData
is called?
Also, if the new route is not shown, and then it is allowed to be shown, asyncData isn't called I think because NuxtJS believes that route is already being shown (or it looks that way just seeing outputs when logging to the console)
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This bug report is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1005">#c1005</a>)</em></sub></div>