Skip to content

Commit

Permalink
#407 Properly turn on/off inspiration fragments when using the next/p…
Browse files Browse the repository at this point in the history
…revious arrows (bug of #384)
  • Loading branch information
Adriána Kohanová committed Oct 20, 2020
1 parent cce0498 commit f68cd67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/components/datasets/datasetMoleculeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ export const DatasetMoleculeView = memo(
dispatch(moveSelectedMoleculeInspirationsSettings(data, nextItem));
dispatch(setInspirationFragmentList(nextItem.computed_inspirations));
dispatch(setCrossReferenceCompoundName(moleculeTitleNext));
if (setRef) {
if (setRef && ref.current) {
setRef(ref.current.nextSibling);
}
};
Expand All @@ -547,7 +547,7 @@ export const DatasetMoleculeView = memo(
dispatch(moveSelectedMoleculeInspirationsSettings(data, previousItem));
dispatch(setInspirationFragmentList(previousItem.computed_inspirations));
dispatch(setCrossReferenceCompoundName(moleculeTitlePrev));
if (setRef) {
if (setRef && ref.current) {
setRef(ref.current.previousSibling);
}
};
Expand Down

0 comments on commit f68cd67

Please sign in to comment.