Procházet zdrojové kódy

:recycle: flipping route watcher on single page

tags/0.9.0
J před 4 roky
rodič
revize
ae6e91bdbf
1 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 2
    3
      vue-theme/src/pages/single.vue

+ 2
- 3
vue-theme/src/pages/single.vue Zobrazit soubor

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

Načítá se…
Zrušit
Uložit