Skip to content

Commit

Permalink
-small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskovar-m2ms committed Dec 16, 2024
1 parent cbf95f1 commit 12499a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/components/preview/molecule/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -1218,13 +1218,13 @@ export const createPose = newPose => async (dispatch, getState) => {

const observationSearchFunctions = {
shortcode: (obs, searchTerm) => {
return obs.code.toLowerCase().includes(searchTerm.toLowerCase());
return obs.code?.toLowerCase().includes(searchTerm.toLowerCase());
},
aliases: (obs, searchTerm) => {
return obs.identifiers?.some(idf => idf.name.toLowerCase().includes(searchTerm.toLowerCase()));
},
compoundId: (obs, searchTerm) => {
return obs.compound_code.toLowerCase().includes(searchTerm.toLowerCase());
return obs.compound_code?.toLowerCase().includes(searchTerm.toLowerCase());
}
};

Expand Down

0 comments on commit 12499a9

Please sign in to comment.