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
{{ message }}
This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
If client-side navigation (<router-link>) is used to switch from the error page to an another page but both the error page URL and new page URL resolve into the same route component, getInitialData is not called due to false positive duplicate check in router.beforeResolve at app/client-entry.js
Switching between /a, /b and /c works fine in any order and regardless of which page was generated with SSR at first.
Actual result
Switching between /a and /b will work fine. Switching from /a or /b to /c will display error as expected. However, switching from /c to /a will crash:
[Vue warn]: Property or method "page" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
found in
---> <Test> at src/pages/test.vue
<ReamRoot>
<Root>
and the page info will be empty:
a b c current page:
The text was updated successfully, but these errors were encountered:
If you're curious the rationale for this architecture is that the actual content is pulled from an API based CMS in getInitialData, so it may generate 404 for arbitrary URLs. However, the error page reuses the base template and includes the menu with <router-link>'s. So currently once a user lands on a 404 page, he may not proceed further.
If client-side navigation (
<router-link>
) is used to switch from the error page to an another page but both the error page URL and new page URL resolve into the same route component,getInitialData
is not called due to false positive duplicate check inrouter.beforeResolve
atapp/client-entry.js
Steps to reproduce
Create page component:
error component:
and entry file:
Then open http://localhost:4000/a
Expected result
Switching between /a, /b and /c works fine in any order and regardless of which page was generated with SSR at first.
Actual result
Switching between /a and /b will work fine. Switching from /a or /b to /c will display error as expected. However, switching from /c to /a will crash:
and the page info will be empty:
The text was updated successfully, but these errors were encountered: