When in mode:'spa'
, if a data bound to the template is undefined
: navigation back or using <nuxt-link/>
s does NOT retrieve anything. The app turns out of sync, it becomes impossible to re-render without refreshing the entire page manually.
If that page contains an undefined
data supposed to be rendered on the page (using data-binding on the template): it simply should not render the underlying component or render an HTML tag with null
or blank or whatever.
But most important is: THE APP SHOULD NOT GET OUT OF SYNC.
At bare minimum, even if the user gets an ugly error message (which I believe he should NEVER see), the user should be able to go back using its browser's history and the page should re-render normally (re-fetching data etc...).
My implementation can be the problem as I use a plugin/
function to :
1. fetch data using axios
2. treat/clean some data
3. comit vuex to mutate the state with previously fetched/cleaned data
Maybe this architecture is not compatible with expected behavior (??)
Also, I dont use a validate()
rule, which I can implement to bypass the problem and present a 404 page if one of the data is undefined
(solution I use so far).
P.S: I am using nuxt version 1.0.0-rc11.
<!--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/c1455">#c1455</a>)</em></sub></div>