+
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');
+ }
});
});
}