From 5afd0dfbabaebfb6b09f0e2f055386ac76059372 Mon Sep 17 00:00:00 2001 From: Sebastian Rindom Date: Mon, 18 Oct 2021 17:45:22 +0200 Subject: [PATCH] fix: undefined references --- packages/medusa/src/subscribers/product.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/medusa/src/subscribers/product.js b/packages/medusa/src/subscribers/product.js index 875b650aaf..bad993d4af 100644 --- a/packages/medusa/src/subscribers/product.js +++ b/packages/medusa/src/subscribers/product.js @@ -70,7 +70,7 @@ class ProductSearchSubscriber { handleProductCreation = async (data) => { const product = await this.retrieveProduct_(data.id) - await this.searchService.addDocuments( + await this.searchService_.addDocuments( ProductService.IndexName, [product], indexTypes.products @@ -86,7 +86,7 @@ class ProductSearchSubscriber { handleProductUpdate = async (data) => { const product = await this.retrieveProduct_(data.id) - await this.meilisearchService_.addDocuments( + await this.searchService_.addDocuments( ProductService.IndexName, [product], indexTypes.products @@ -94,15 +94,12 @@ class ProductSearchSubscriber { } handleProductDeletion = async (data) => { - await this.meilisearchService_.deleteDocument( - ProductService.IndexName, - data.id - ) + await this.searchService_.deleteDocument(ProductService.IndexName, data.id) } handleProductVariantChange = async (data) => { const product = await this.retrieveProduct_(data.product_id) - await this.meilisearchService_.addDocuments( + await this.searchService_.addDocuments( ProductService.IndexName, [product], indexTypes.products