From 89a322aa388b93ac6e65aa5dde3267b0898e6210 Mon Sep 17 00:00:00 2001 From: Jefferson Date: Fri, 22 Dec 2023 08:04:31 -0300 Subject: [PATCH] Fix when there's no item with selected delivery sla --- react/fetchers/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/react/fetchers/index.js b/react/fetchers/index.js index f47ca94..42a93bb 100644 --- a/react/fetchers/index.js +++ b/react/fetchers/index.js @@ -114,7 +114,8 @@ export function updateShippingData( logisticsInfoWithPickupSelected ) - const defaultDeliverySla = firstItemWithSelectedDelivery.selectedSla + const defaultDeliverySla = + firstItemWithSelectedDelivery && firstItemWithSelectedDelivery.selectedSla const logisticsInfoWithDefaultDeliverySla = logisticsInfoWithPickupSelected.map((li) => {