Static GitHub Issues

[2118] 'from' route object in context undefined in ssr but not in spa mode.

prev: How can I make sure that the data that has just loaded into LocalStorage can be used immediately in the code?
next: Custom component not rendering in dev mode

With this code:

async asyncData ({ from }) {
  console.log("from", from")
}

On browser refresh, this page will log undefined in ssr mode but in spa mode it logs it's own route. This problem defeats the 'shallow routing' trick described by @Atinux here: https://github.com/nuxt/nuxt.js/issues/1322

<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1878">#c1878</a>)</em></sub></div>