diff --git a/src/app/store/products/products.component.html b/src/app/store/products/products.component.html index 6374b4b..e17dcfa 100644 --- a/src/app/store/products/products.component.html +++ b/src/app/store/products/products.component.html @@ -5,7 +5,7 @@
-
+
Links
@@ -21,7 +21,7 @@

-
+
cloud_download Downloads
diff --git a/src/app/store/products/products.component.ts b/src/app/store/products/products.component.ts index 92096f9..9e78e73 100644 --- a/src/app/store/products/products.component.ts +++ b/src/app/store/products/products.component.ts @@ -29,12 +29,13 @@ export class ProductsComponent { this.product = data[0]; this.preview = [this.product.originalImage]; - this.preview = this.preview.concat( - this.product.files.filter(row => row.type == 'preview').map(row => row.link) - ); - - this.links = this.product.files.filter(row => row.type == 'link'); - this.attachments = this.product.files.filter(row => row.type == 'other'); + if (this.product.files) { + this.preview = this.preview.concat( + this.product.files.filter(row => row.type == 'preview').map(row => row.link) + ); + this.links = this.product.files.filter(row => row.type == 'link'); + this.attachments = this.product.files.filter(row => row.type == 'other'); + } }); }); }