Skip to content

Commit

Permalink
app(fix): Fix liquids always required during protocol setup (#16762)
Browse files Browse the repository at this point in the history
Closes RQA-3535
  • Loading branch information
mjhuff authored Nov 12, 2024
1 parent 60dca54 commit 6ed5aaf
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions app/src/redux-resources/runs/hooks/useRequiredSetupStepsInOrder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,19 @@ const keysInOrder = (
protocolAnalysis == null
? NO_ANALYSIS_STEPS_IN_ORDER
: ALL_STEPS_IN_ORDER.filter((stepKey: StepKey) => {
if (protocolAnalysis.modules.length === 0) {
return stepKey !== MODULE_SETUP_STEP_KEY
if (
stepKey === MODULE_SETUP_STEP_KEY &&
protocolAnalysis.modules.length === 0
) {
return false
} else if (
stepKey === LIQUID_SETUP_STEP_KEY &&
protocolAnalysis.liquids.length === 0
) {
return false
} else {
return true
}

if (protocolAnalysis.liquids.length === 0) {
return stepKey !== LIQUID_SETUP_STEP_KEY
}
return true
})
return { orderedSteps: orderedSteps as StepKey[], orderedApplicableSteps }
}
Expand Down

0 comments on commit 6ed5aaf

Please sign in to comment.