Skip to content

Commit

Permalink
fix HistoricalProtocolRunDrawer RTP implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ncdiehl11 committed Aug 12, 2024
1 parent a67b8d8 commit 0a3cb12
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions app/src/organisms/Devices/HistoricalProtocolRunDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,17 @@ export function HistoricalProtocolRunDrawer(
const allLabwareOffsets = run.labwareOffsets?.sort(
(a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
)
const runDataFileIds = run.runTimeParameters.reduce<string[]>(
(acc, parameter) => {
if (parameter.type === 'csv_file') {
return parameter.file?.id != null ? [...acc, parameter.file?.id] : acc
}
return acc
},
[]
)
const runDataFileIds =
'runTimeParameters' in run
? run.runTimeParameters.reduce<string[]>((acc, parameter) => {
if (parameter.type === 'csv_file') {
return parameter.file?.id != null
? [...acc, parameter.file?.id]
: acc
}
return acc
}, [])
: []
const uniqueLabwareOffsets = allLabwareOffsets?.filter(
(offset, index, array) => {
return (
Expand Down

0 comments on commit 0a3cb12

Please sign in to comment.