From e2897e2a62c253d8ac39e08dde88f89905eb3ea5 Mon Sep 17 00:00:00 2001 From: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com> Date: Thu, 2 Sep 2021 17:49:02 +0200 Subject: [PATCH] hotfix: Adds options to cloned RestockNotificationService (#369) --- .../src/services/restock-notification.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/packages/medusa-plugin-restock-notification/src/services/restock-notification.js b/packages/medusa-plugin-restock-notification/src/services/restock-notification.js index 014c38b748..d91c576785 100644 --- a/packages/medusa-plugin-restock-notification/src/services/restock-notification.js +++ b/packages/medusa-plugin-restock-notification/src/services/restock-notification.js @@ -34,13 +34,16 @@ class RestockNotificationService extends BaseService { return this } - const cloned = new RestockNotificationService({ - manager: transactionManager, - options: this.options_, - eventBusService: this.eventBus_, - productVariantService: this.productVariantService_, - restockNotificationModel: this.restockNotificationModel_, - }) + const cloned = new RestockNotificationService( + { + manager: transactionManager, + options: this.options_, + eventBusService: this.eventBus_, + productVariantService: this.productVariantService_, + restockNotificationModel: this.restockNotificationModel_, + }, + this.options_ + ) cloned.transactionManager_ = transactionManager