Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lids to labware def list, add some null protection
Browse files Browse the repository at this point in the history
smb2268 committed Jan 30, 2025
1 parent 9c60b01 commit 511003d
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -287,7 +287,7 @@ export function getFailedCmdRelevantLabware(
const failedLWURI = runRecord?.data.labware.find(
labware => labware.id === recentRelevantFailedLabwareCmd?.params.labwareId
)?.definitionUri
if (failedLWURI != null) {
if (failedLWURI != null && Object.keys(lwDefsByURI).includes(failedLWURI)) {
return {
name: getLabwareDisplayName(lwDefsByURI[failedLWURI]),
nickname: labwareNickname,
6 changes: 5 additions & 1 deletion shared-data/js/helpers/getLoadedLabwareDefinitionsByUri.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,11 @@ export function getLoadedLabwareDefinitionsByUri(
commands: RunTimeCommand[]
): LabwareDefinitionsByUri {
return commands.reduce((acc, command) => {
if (command.commandType === 'loadLabware') {
if (
command.commandType === 'loadLabware' ||
command.commandType === 'loadLid' ||
command.commandType === 'loadLidStack'
) {
const labwareDef: LabwareDefinition2 | undefined =
command.result?.definition
if (labwareDef == null) {

0 comments on commit 511003d

Please sign in to comment.