|
@@ -154,15 +154,19 @@ export default {
|
|
|
let img_src = relations.images.data
|
|
|
console.log('img_src', img_src);
|
|
|
|
|
|
- img_src = [];
|
|
|
+
|
|
|
item.images = []
|
|
|
for (var j = 0; j < img_src.length; j++) {
|
|
|
- item.images.push({
|
|
|
- title: img_src[j].meta.title,
|
|
|
-
|
|
|
-
|
|
|
- url: img_src[j].meta.imageDerivatives.links.card_medium.href
|
|
|
- })
|
|
|
+ if(img_src[j].meta.imageDerivatives){
|
|
|
+ item.images.push({
|
|
|
+ title: img_src[j].meta.title,
|
|
|
+
|
|
|
+
|
|
|
+ url: img_src[j].meta.imageDerivatives.links.card_medium.href
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ console.warn('missing image derivative '+j+'/'+img_src.length+' for '+attrs.title);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
items.push(item)
|