瀏覽代碼

displaying only first img in article linked materials as all but first image derivative are missing, still to fix

Bachir Soussi Chiadmi 4 年之前
父節點
當前提交
d7a701c8f5

File diff suppressed because it is too large
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


+ 6 - 4
web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue

@@ -226,10 +226,12 @@ export default {
                 field.images = [];
                 included.relationships.images.data.forEach((img) => {
                   // console.log('href', img.meta.imageDerivatives.links.card_medium.href);
-                  field.images.push({
-                    title:img.meta.title,
-                    url:img.meta.imageDerivatives.links.card_medium.href
-                  })
+                  if(img.meta.imageDerivatives){
+                    field.images.push({
+                      title:img.meta.title,
+                      url:img.meta.imageDerivatives.links.card_medium.href
+                    })
+                  }
                 })
                 break;
               case 'field_thesaurus':

Some files were not shown because too many files changed in this diff