Skip to content

Commit

Permalink
fix(protocol-designer): resolve console error by adding null protecti…
Browse files Browse the repository at this point in the history
…on (#17094)
  • Loading branch information
jerader authored Dec 12, 2024
1 parent 0104760 commit 7ff5e27
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,14 @@ export function MoveLiquidTools(props: StepFormProps): JSX.Element {
additionalEquipmentEntities[String(propsForFields.dispense_labware.value)]
?.name === 'trashBin'

const destinationLabwareType = getTrashOrLabware(
labwares,
additionalEquipmentEntities,
formData.dispense_labware as string
)
const destinationLabwareType =
formData.dispense_labware != null
? getTrashOrLabware(
labwares,
additionalEquipmentEntities,
formData.dispense_labware as string
)
: null
const isDestinationTrash =
destinationLabwareType != null
? ['trashBin', 'wasteChute'].includes(destinationLabwareType)
Expand Down

0 comments on commit 7ff5e27

Please sign in to comment.