Преглед изворни кода

:recycle: flipping route watcher on single page

tags/0.9.0
J пре 4 година
родитељ
комит
ae6e91bdbf
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2
    3
      vue-theme/src/pages/single.vue

+ 2
- 3
vue-theme/src/pages/single.vue Прегледај датотеку

@@ -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
             }

Loading…
Откажи
Сачувај