From b2ab68cde3080fd057c8461a700552e44a0bd5ec Mon Sep 17 00:00:00 2001 From: Jethary Date: Fri, 16 Feb 2024 14:42:44 -0500 Subject: [PATCH] fix random well selection field bug --- .../fields/WellSelectionField/WellSelectionField.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx b/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx index 0ba354a2a0a..fc5244bd1fc 100644 --- a/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/WellSelectionField/WellSelectionField.tsx @@ -40,9 +40,10 @@ export const WellSelectionField = (props: Props): JSX.Element => { const stepId = useSelector(getSelectedStepId) const pipetteEntities = useSelector(stepFormSelectors.getPipetteEntities) const wellSelectionLabwareKey = useSelector(getWellSelectionLabwareKey) - const primaryWellCount = Array.isArray(selectedWells) - ? selectedWells.length.toString() - : undefined + const primaryWellCount = + Array.isArray(selectedWells) && selectedWells.length > 0 + ? selectedWells.length.toString() + : undefined const pipette = pipetteId != null ? pipetteEntities[pipetteId] : null const is8Channel = pipette != null ? pipette.spec.channels === 8 : false