Skip to content

Commit b7ba137

Browse files
committed
fix(app): fix the offset filter logic so we don't show multiple of the same offsets
1 parent 1ffa2c4 commit b7ba137

File tree

1 file changed

+3
-3
lines changed
  • app/src/organisms/LabwarePositionCheck/LPCFlows/hooks/useLPCLabwareInfo/getUniqueValidLwLocationInfoByAnalysis/getLPCUniqValidLabwareLocationInfo

1 file changed

+3
-3
lines changed

app/src/organisms/LabwarePositionCheck/LPCFlows/hooks/useLPCLabwareInfo/getUniqueValidLwLocationInfoByAnalysis/getLPCUniqValidLabwareLocationInfo/appendUniqValidLocCombo.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ export function appendUniqValidLocCombo(
1616
return acc
1717
} else {
1818
const isUniqueCombo = !acc.some(accCombo => {
19-
const { labwareId, ...comboNoLwId } = combo
20-
const { labwareId: accLwId, ...accComboNoLwId } = accCombo
19+
const { lwOffsetLocSeq: comboOffsetLs, definitionUri: comboUri } = combo
20+
const { lwOffsetLocSeq: accOffsetLs, definitionUri: accUri } = accCombo
2121

22-
return isEqual(accComboNoLwId, comboNoLwId)
22+
return isEqual(comboOffsetLs, accOffsetLs) && isEqual(comboUri, accUri)
2323
})
2424
const isValidCombo = isValidLocCombo(lwDefs, combo)
2525

0 commit comments

Comments
 (0)