Skip to content

Commit

Permalink
fix(protocol-designer): fix no tiprack-related whitescreen (#17373)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ncdiehl11 authored Jan 28, 2025
1 parent 5bd8f03 commit fd9b628
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export function TiprackField(props: TiprackFieldProps): JSX.Element {
<ListItem type="noActive">
<Flex padding={SPACING.spacing12}>
<StyledText desktopStyle="bodyDefaultRegular">
{tiprackOptions[0].name}
{tiprackOptions[0]?.name ?? t('no_tiprack')}
</StyledText>
</Flex>
</ListItem>
Expand Down

0 comments on commit fd9b628

Please sign in to comment.