From 9ba0e158c205470a1af0889d5e4e57098bcfb852 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Thu, 27 Jun 2024 13:52:05 +0200 Subject: [PATCH] NTR: fix order items --- .../sw-order/component/sw-order-line-items-grid/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js index f5c41291d..5a7f11b6b 100644 --- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js +++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js @@ -355,6 +355,11 @@ Component.override('sw-order-line-items-grid', { return itemStatus.quantityCanceled; }, isCancelable(item){ + + if(this.cancelStatus === undefined || this.cancelStatus === null){ + return false; + } + const itemStatus = this.cancelStatus[item.id]; if(itemStatus === undefined || itemStatus === null){ return false; @@ -364,6 +369,9 @@ Component.override('sw-order-line-items-grid', { }, getCancelData(item){ + if(this.cancelStatus === undefined || this.cancelStatus === null){ + return {}; + } const itemStatus = this.cancelStatus[item.id]; if(itemStatus === undefined){ return {};