Skip to content

Commit da45e90

Browse files
committed
fix(protocol-designer): fix no tiprack-related whitescreen
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
1 parent 8f8b055 commit da45e90

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

protocol-designer/src/assets/localization/en/protocol_steps.json

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"multiAspirate": "Consolidate path",
7474
"multiDispense": "Distribute path",
7575
"new_location": "New location",
76+
"no_tiprack": "No tiprack available",
7677
"off_deck": "Off-Deck",
7778
"pause": {
7879
"untilResume": "Pausing until manually told to resume",

protocol-designer/src/pages/Designer/ProtocolSteps/StepForm/PipetteFields/TiprackField.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function TiprackField(props: TiprackFieldProps): JSX.Element {
6464
<ListItem type="noActive">
6565
<Flex padding={SPACING.spacing12}>
6666
<StyledText desktopStyle="bodyDefaultRegular">
67-
{tiprackOptions[0].name}
67+
{tiprackOptions[0]?.name ?? t('no_tiprack')}
6868
</StyledText>
6969
</Flex>
7070
</ListItem>

0 commit comments

Comments
 (0)