Skip to content

Commit

Permalink
fix(app): initialize disposal volume field with correct value (#16219)
Browse files Browse the repository at this point in the history
  • Loading branch information
smb2268 authored Sep 9, 2024
1 parent adde5a7 commit 7002fac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/assets/localization/en/quick_transfer.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"pipette_path": "Pipette path",
"pipette_path_multi_aspirate": "Multi-aspirate",
"pipette_path_multi_dispense": "Multi-dispense",
"pipette_path_multi_dispense_volume_blowout": "Multi-dispense, {{volume}} disposal volume, blowout {{blowOutLocation}}",
"pipette_path_multi_dispense_volume_blowout": "Multi-dispense, {{volume}} µL disposal volume, blowout {{blowOutLocation}}",
"pipette_path_single": "Single transfers",
"pre_wet_tip": "Pre-wet tip",
"quick_transfer": "Quick transfer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ export function PipettePath(props: PipettePathProps): JSX.Element {
BlowOutLocation | undefined
>(state.blowOut)

const [disposalVolume, setDisposalVolume] = React.useState<number>(
state.volume
)
const [disposalVolume, setDisposalVolume] = React.useState<
number | undefined
>(state?.disposalVolume)
const maxPipetteVolume = Object.values(state.pipette.liquids)[0].maxVolume
const tipVolume = Object.values(state.tipRack.wells)[0].totalLiquidVolume

Expand Down Expand Up @@ -136,7 +136,7 @@ export function PipettePath(props: PipettePathProps): JSX.Element {
const volumeRange = { min: 1, max: maxDisposalCapacity }

const volumeError =
disposalVolume !== null &&
disposalVolume != null &&
(disposalVolume < volumeRange.min || disposalVolume > volumeRange.max)
? t(`value_out_of_range`, {
min: volumeRange.min,
Expand Down

0 comments on commit 7002fac

Please sign in to comment.