|
|
@@ -223,13 +223,12 @@ export default {
|
|
223
|
223
|
},
|
|
224
|
224
|
watch: {
|
|
225
|
225
|
$route(to, from) {
|
|
226
|
|
- // Only load post data when
|
|
227
|
|
- // navigating TO a single page
|
|
|
226
|
+ // Only load post data when navigating TO a single page
|
|
228
|
227
|
const path = to.fullPath.split('/').filter(p => p)
|
|
229
|
228
|
const hasSort = path.filter(fragment => Object.values(sortTypes).includes(fragment))
|
|
230
|
229
|
console.log('hasSort :', hasSort)
|
|
231
|
230
|
console.log('path :', path)
|
|
232
|
|
- if (path.length <= 2 && postTypes.includes(path[0]) && hasSort.length < 1) {
|
|
|
231
|
+ if (path.length >= 2 && postTypes.includes(path[0]) && hasSort.length < 1) {
|
|
233
|
232
|
this._clearHero(this.$store)
|
|
234
|
233
|
this.loadPostData()
|
|
235
|
234
|
}
|