Parcourir la source

:bug: omiting episode from getMore

tags/0.9.0
J il y a 4 ans
Parent
révision
63eaafe542
1 fichiers modifiés avec 4 ajouts et 4 suppressions
  1. 4
    4
      vue-theme/src/pages/list.vue

+ 4
- 4
vue-theme/src/pages/list.vue Voir le fichier

@@ -53,7 +53,7 @@ export default {
53 53
             return typeFromRoute(this.$route)
54 54
         },
55 55
         pType() {
56
-            console.log(this.type)
56
+            console.log(this.type, `${convertTitleCase(this.type)}s`)
57 57
             return this.sortBy ? `${convertTitleCase(this.type.split('/')[0])}s` : `${convertTitleCase(this.type)}s`
58 58
         },
59 59
         loaded() {
@@ -92,7 +92,7 @@ export default {
92 92
                 dispatchParams.sortType = sortTypes.currentAndUpcoming
93 93
             }
94 94
             // Add to existing except episodes
95
-            else {
95
+            else if (this.type != 'episode') {
96 96
                 dispatchAction = `getMore${this.pType}`
97 97
             }
98 98
             const res = await this.$store.dispatch(dispatchAction, dispatchParams)
@@ -161,7 +161,7 @@ export default {
161 161
             // only grab the hero if moving to another list page
162 162
             // eg. list page -> list page
163 163
             const path = to.fullPath.split('/').filter(p => p)
164
-
164
+            console.log('to:', path)
165 165
             // !:Only fires navigating TO list page
166 166
             if (path.length > 1) return
167 167
             
@@ -170,9 +170,9 @@ export default {
170 170
             
171 171
             // TODO: Track last loaded page per post type
172 172
             // Less http calls
173
+            this.getPosts(true)
173 174
             this.page = 1
174 175
             this.setIntersectionLoader()
175
-            this.getPosts(true)
176 176
         },
177 177
     },
178 178
     mounted() {

Chargement…
Annuler
Enregistrer