From 571f7afa225378b9e932c2773f36eaf9d0fef31b Mon Sep 17 00:00:00 2001 From: Michael Bromley Date: Thu, 29 Aug 2019 10:51:25 +0200 Subject: [PATCH] fix(elasticsearch-plugin): Fix null productVariantPreview error --- packages/elasticsearch-plugin/src/elasticsearch.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/elasticsearch-plugin/src/elasticsearch.service.ts b/packages/elasticsearch-plugin/src/elasticsearch.service.ts index a67ade36e6..c2c9196685 100644 --- a/packages/elasticsearch-plugin/src/elasticsearch.service.ts +++ b/packages/elasticsearch-plugin/src/elasticsearch.service.ts @@ -278,7 +278,7 @@ export class ElasticsearchService { productName: source.productName[0], productVariantId: source.productVariantId[0].toString(), productVariantName: source.productVariantName[0], - productVariantPreview: source.productVariantPreview[0], + productVariantPreview: source.productVariantPreview[0] || '', facetIds: source.facetIds as string[], facetValueIds: source.facetValueIds as string[], collectionIds: source.collectionIds as string[],