From 5615d1ef0cb3047723d2a45ebc2739412d35d985 Mon Sep 17 00:00:00 2001 From: Jethary Rader <66035149+jerader@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:06:56 -0400 Subject: [PATCH] fix(protocol-designer): fix well depth for blowout field (#15809) closes RESC-309 --- .../StepEditForm/fields/BlowoutZOffsetField.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx b/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx index 631876ef442..453e86cee26 100644 --- a/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx +++ b/protocol-designer/src/components/StepEditForm/fields/BlowoutZOffsetField.tsx @@ -4,6 +4,7 @@ import { DEST_WELL_BLOWOUT_DESTINATION, SOURCE_WELL_BLOWOUT_DESTINATION, } from '@opentrons/step-generation' +import { getWellDepth } from '@opentrons/shared-data' import { COLORS, Flex, @@ -45,9 +46,9 @@ export function BlowoutZOffsetField( labwareId = destLabwareId } - const labwareZDimension = - labwareId != null - ? labwareEntities[String(labwareId)]?.def.dimensions.zDimension + const labwareWellDepth = + labwareId != null && labwareEntities[String(labwareId)]?.def != null + ? getWellDepth(labwareEntities[String(labwareId)].def, 'A1') : 0 return ( @@ -61,7 +62,7 @@ export function BlowoutZOffsetField( name={name} zValue={Number(value)} updateValue={updateValue} - wellDepthMm={labwareZDimension} + wellDepthMm={labwareWellDepth} /> ) : null}