Commit 3fb71bed authored by Evan You's avatar Evan You

handle initialRender check without relying on external state

parent 49645e49
...@@ -37,11 +37,12 @@ export default { ...@@ -37,11 +37,12 @@ export default {
}, },
data () { data () {
const isInitialRender = !this.$root._isMounted
return { return {
loading: false, loading: false,
transition: 'slide-up', transition: 'slide-up',
displayedPage: Number(this.$store.state.route.params.page) || 1, displayedPage: isInitialRender ? Number(this.$store.state.route.params.page) || 1 : -1,
displayedItems: this.$store.getters.activeItems displayedItems: isInitialRender ? this.$store.getters.activeItems : []
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment