From 5ea4b7bb32f46fabbf0647b153dfff6c2b874418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iva=CC=81n=20Lo=CC=81pez=20Luna?= Date: Wed, 22 May 2024 13:07:03 -0600 Subject: [PATCH] Fix [customData] Extra validation --- CHANGELOG.md | 4 ++++ react/components/B2BQuotesLockingModal.tsx | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d5ebc..956d4ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Fixed that if there is another custom application in the custom data, the "B2BQuotesLockingModal.tsx" component would break on its own. + ## [1.6.0] - 2023-08-10 + ### Added diff --git a/react/components/B2BQuotesLockingModal.tsx b/react/components/B2BQuotesLockingModal.tsx index 9dd84d9..86dd4d8 100644 --- a/react/components/B2BQuotesLockingModal.tsx +++ b/react/components/B2BQuotesLockingModal.tsx @@ -100,7 +100,7 @@ const B2BQuotesLockingModal = () => { const { orderForm } = orderFormData const { customData, items } = orderForm - if (!customData?.customApps) { + if (!customData?.customApps || customData?.customApps.findIndex( (item: any) => item.id === 'b2b-quotes-graphql' ) === -1) { return }