Skip to content

Commit

Permalink
Merge pull request #214 from m2ms/#431
Browse files Browse the repository at this point in the history
#431 - fixed problem with vectors
  • Loading branch information
boriskovar-m2ms authored Oct 29, 2020
2 parents 85562cf + e1a3e86 commit 31b9da4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion js/reducers/selection/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ export const getMoleculeOfCurrentVector = createSelector(
if (selectedVectorSmile !== null && vectorList && moleculeList) {
const foundedVector = vectorList.find(vector => vector.name.includes(selectedVectorSmile));
if (foundedVector) {
return moleculeList.find(molecule => molecule.id === foundedVector.moleculeId);
for (const molecule in moleculeList) {
if (moleculeList.hasOwnProperty(molecule)) {
if (molecule.id === foundedVector.moleculeId) {
return molecule;
}
}
}
return undefined;
}
}
return null;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fragalysis-frontend",
"version": "0.9.10",
"version": "0.9.11",
"description": "Frontend for fragalysis",
"main": "webpack.config.js",
"scripts": {
Expand Down

0 comments on commit 31b9da4

Please sign in to comment.