Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(app): currentOffsetModal only displays latest offsets #11913

Merged
merged 9 commits into from
Jan 10, 2023
Prev Previous commit
Next Next commit
rename ao to currentLabwareOffsets
  • Loading branch information
jerader committed Dec 23, 2022
commit 026ff490dfdab961628d669d5e2ba97047287e91
6 changes: 3 additions & 3 deletions app/src/organisms/Devices/ProtocolRun/SetupLabware/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ export function getLatestCurrentOffsets(
const latestCurrentOffsets = nonIdentityOffsets.reduce<LabwareOffset[]>(
(acc, offset) => {
const previousMatchIndex = acc.findIndex(
ao =>
isEqual(offset.location, ao.location) &&
isEqual(offset.definitionUri, ao.definitionUri)
currentLabwareOffsets =>
isEqual(offset.location, currentLabwareOffsets.location) &&
isEqual(offset.definitionUri, currentLabwareOffsets.definitionUri)
)
if (
previousMatchIndex >= 0 &&
Expand Down