Skip to content

Commit

Permalink
refactor(protocol-designer): nicknames now properly import
Browse files Browse the repository at this point in the history
  • Loading branch information
jerader committed Feb 16, 2024
1 parent cb0d4e6 commit 3c0b009
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions protocol-designer/src/labware-ingred/reducers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,15 @@ export const containers: Reducer<ContainersState, any> = handleActions(

return loadLabwareCommands.reduce(
(acc: ContainersState, command, key): ContainersState => {
const { loadName, displayName } = command.params
const { labwareId, displayName } = command.params

Check warning on line 170 in protocol-designer/src/labware-ingred/reducers/index.ts

View check run for this annotation

Codecov / codecov/patch

protocol-designer/src/labware-ingred/reducers/index.ts#L170

Added line #L170 was not covered by tests

if (labwareId == null) {
console.error('expected to find a labwareId but could not')

Check warning on line 173 in protocol-designer/src/labware-ingred/reducers/index.ts

View check run for this annotation

Codecov / codecov/patch

protocol-designer/src/labware-ingred/reducers/index.ts#L173

Added line #L173 was not covered by tests
}

return {
...acc,
[loadName]: {
[labwareId ?? '']: {
nickname: displayName,
disambiguationNumber: key,
},
Expand Down

0 comments on commit 3c0b009

Please sign in to comment.