From 5ff23d6200009754b839485890e4c4f797eaf402 Mon Sep 17 00:00:00 2001 From: Henri Nieminen Date: Mon, 4 Dec 2023 15:36:36 +0200 Subject: [PATCH] Fix getting targetIdentifier if plan_unit falsy --- .../directReservationLinkModal/DirectReservationLinkModal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plotSearch/components/directReservationLinkModal/DirectReservationLinkModal.js b/src/plotSearch/components/directReservationLinkModal/DirectReservationLinkModal.js index a05f066fb..78eed6316 100644 --- a/src/plotSearch/components/directReservationLinkModal/DirectReservationLinkModal.js +++ b/src/plotSearch/components/directReservationLinkModal/DirectReservationLinkModal.js @@ -47,7 +47,7 @@ const renderTargets = ({ formValues, }: RenderTargetProps): React$Node => {!!targets && targets.map((target) => { - const targetIdentifier = target.plan_unit.identifier || target.custom_detailed_plan.identifier; + const targetIdentifier = target.plan_unit && target.plan_unit.identifier || target.custom_detailed_plan && target.custom_detailed_plan.identifier; let isChecked = false; if (formValues) {