From fd9b62832054d4bacdc7ebc789aaa642c87cce34 Mon Sep 17 00:00:00 2001 From: Nick Diehl <47604184+ncdiehl11@users.noreply.github.com> Date: Tue, 28 Jan 2025 16:44:07 -0500 Subject: [PATCH] fix(protocol-designer): fix no tiprack-related whitescreen (#17373) This PR fixes a PD whitescreen bug where a user tries to create a transfer step wihout a tiprack available on the deck. As a temporary fix, I null check the first tiprack option in `TiprackField` and default to a placeholder string. This prevents a whitescreen, and creates a not-enough-tips timeline error if the step is saved, instructing the user to add tipracks to the deck to fix. Closes RESC-380 --- .../src/assets/localization/en/protocol_steps.json | 1 + .../ProtocolSteps/StepForm/PipetteFields/TiprackField.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/protocol-designer/src/assets/localization/en/protocol_steps.json b/protocol-designer/src/assets/localization/en/protocol_steps.json index 12ebc493447..c92e9cdcb83 100644 --- a/protocol-designer/src/assets/localization/en/protocol_steps.json +++ b/protocol-designer/src/assets/localization/en/protocol_steps.json @@ -73,6 +73,7 @@ "multiAspirate": "Consolidate path", "multiDispense": "Distribute path", "new_location": "New location", + "no_tiprack": "No tiprack available", "off_deck": "Off-Deck", "pause": { "untilResume": "Pausing until manually told to resume", diff --git a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/TiprackField.tsx b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/TiprackField.tsx index 17e09db5ec6..e589d3226cb 100644 --- a/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/TiprackField.tsx +++ b/protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/TiprackField.tsx @@ -64,7 +64,7 @@ export function TiprackField(props: TiprackFieldProps): JSX.Element { - {tiprackOptions[0].name} + {tiprackOptions[0]?.name ?? t('no_tiprack')}