Przeglądaj źródła

:bug: omiting episode from getMore

tags/0.9.0
J 4 lat temu
rodzic
commit
63eaafe542
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4
    4
      vue-theme/src/pages/list.vue

+ 4
- 4
vue-theme/src/pages/list.vue Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz