Przeglądaj źródła

:bug: checking for hero before loading

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

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

11
                 router-link(:to="`/${type}/${post.slug}`")
11
                 router-link(:to="`/${type}/${post.slug}`")
12
                     p {{post.featured}}
12
                     p {{post.featured}}
13
                     img(v-if="post.featured" :src="post.featured" alt="post thumbnail")
13
                     img(v-if="post.featured" :src="post.featured" alt="post thumbnail")
14
-                    img(v-else-if="JSON.parse(post.hero).url" :src="getThumbnailFromYt(JSON.parse(post.hero).url)" alt="post thumbnail from YouTube")
14
+                    img(v-else-if="post.hero && JSON.parse(post.hero).url" :src="getThumbnailFromYt(JSON.parse(post.hero).url)" alt="post thumbnail from YouTube")
15
                     p(v-else-if="post.hero") ERROR: {{ post.hero }}
15
                     p(v-else-if="post.hero") ERROR: {{ post.hero }}
16
                     p(v-else) ERROR: no thumbnail
16
                     p(v-else) ERROR: no thumbnail
17
 
17
 

Ładowanie…
Anuluj
Zapisz