Selaa lähdekoodia

:bug: adjusting route check for single page | #117

tags/0.9.0
J 4 vuotta sitten
vanhempi
commit
4c60dbbe7c
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2
    2
      vue-theme/src/pages/single.vue

+ 2
- 2
vue-theme/src/pages/single.vue Näytä tiedosto

@@ -48,7 +48,7 @@ import breadcrumb from '@/components/breadcrumb'
48 48
 
49 49
 import { postTypeGetters, scrollTop, heroUtils } from './mixin-post-types'
50 50
 
51
-import { sortTypes, convertTitleCase, dePluralize, typeFromRoute } from '@/utils/helpers'
51
+import { postTypes, sortTypes, convertTitleCase, dePluralize, typeFromRoute } from '@/utils/helpers'
52 52
 
53 53
 const TIMEOUT = 1
54 54
 
@@ -227,7 +227,7 @@ export default {
227 227
             const hasSort = path.filter(fragment => Object.values(sortTypes).includes(fragment))
228 228
             console.log('hasSort :', hasSort)
229 229
             console.log('path :', path)
230
-            if (path.length < 1 && hasSort.length < 1) {
230
+            if (path.length <= 2 && postTypes.includes(path[0]) && hasSort.length < 1) {
231 231
                 this._clearHero(this.$store)
232 232
                 this.loadPostData()
233 233
             }

Loading…
Peruuta
Tallenna