Procházet zdrojové kódy

:recycle: trying to use prop id

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

+ 1
- 10
vue-theme/src/pages/single.vue Zobrazit soubor

@@ -199,22 +199,13 @@ export default {
199 199
                 post => post.slug == this.$route.params.slug,
200 200
             )[0]
201 201
 
202
-            // Look if it exists before you try and load everything!
203
-            // if(!singlePostData) {
204
-            //     const res = await this.$store.dispatch(`getAll${convertTitleCase(this.type)}s`, { sortType: null, params: null})
205
-            //     allPostsOfType = res
206
-            //     singlePostData = allPostsOfType.filter(
207
-            //         post => post.slug == this.$route.params.slug,
208
-            //     )[0]
209
-            // }
210
-
211 202
             if (!singlePostData) return console.error('could not get single post data...')
212 203
             
213 204
             // NOT plural
214 205
             this.checkAndSetHero(singlePostData)
215 206
             await this.$store.dispatch(
216 207
                 `getSingle${convertTitleCase(this.type)}`,
217
-                singlePostData.id,
208
+                this.id,
218 209
             )
219 210
             this.loading = false
220 211
         },

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