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 {
},
data () {
const isInitialRender = !this.$root._isMounted
return {
loading: false,
transition: 'slide-up',
displayedPage: Number(this.$store.state.route.params.page) || 1,
displayedItems: this.$store.getters.activeItems
displayedPage: isInitialRender ? Number(this.$store.state.route.params.page) || 1 : -1,
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