Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/#449' into allfunctionality
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskovar-m2ms committed Nov 6, 2020
2 parents 32c0d52 + 94db501 commit 25989d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/components/preview/molecule/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ export const applyDirectSelection = (stage, stageSummaryView) => (dispatch, getS
const state = getState();

const directDisplay = state.apiReducers.direct_access;
const mol_group_selection = state.selectionReducers.mol_group_selection;
const fragmentDisplayList = state.selectionReducers.fragmentDisplayList;
const proteinList = state.selectionReducers.proteinList;
const complexList = state.selectionReducers.complexList;
Expand All @@ -415,6 +414,8 @@ export const applyDirectSelection = (stage, stageSummaryView) => (dispatch, getS
let proteinCodeModded = mol.protein_code.toLowerCase();
if (m.exact ? proteinCodeModded === directProteinCodeModded : proteinCodeModded.includes(directProteinNameModded)) {
let molGroupId = groupId;
// Has to be declared here because otherwise we read stale value
const mol_group_selection = getState().selectionReducers.mol_group_selection;
if (!mol_group_selection.includes(parseInt(molGroupId))) {
let molGroup = mol_group_list.find(g => g.id === parseInt(molGroupId));
dispatch(selectMoleculeGroup(molGroup, stageSummaryView));
Expand Down

0 comments on commit 25989d9

Please sign in to comment.