diff --git a/js/components/preview/molecule/moleculeList.js b/js/components/preview/molecule/moleculeList.js index 243ddb134..9baf3e351 100644 --- a/js/components/preview/molecule/moleculeList.js +++ b/js/components/preview/molecule/moleculeList.js @@ -416,7 +416,7 @@ export const MoleculeList = memo(({ height, setFilterItemsHeight, filterItemsHei useEffect(() => { if ((proteinsHasLoaded === true || proteinsHasLoaded === null) && all_mol_lists.length > 0) { if (!directAccessProcessed && directDisplay && directDisplay.molecules && directDisplay.molecules.length > 0) { - dispatch(applyDirectSelection(majorViewStage, stageSummaryView)); + dispatch(applyDirectSelection(majorViewStage)); wereMoleculesInitialized.current = true; } if ( @@ -457,7 +457,6 @@ export const MoleculeList = memo(({ height, setFilterItemsHeight, filterItemsHei all_mol_lists, directDisplay, directAccessProcessed, - stageSummaryView, object_selection, tags, categories, diff --git a/js/components/preview/molecule/redux/dispatchActions.js b/js/components/preview/molecule/redux/dispatchActions.js index 69a3e3698..2b1e97f90 100644 --- a/js/components/preview/molecule/redux/dispatchActions.js +++ b/js/components/preview/molecule/redux/dispatchActions.js @@ -884,7 +884,7 @@ export const removeAllSelectedMolTypes = (majorViewStage, molecules, skipTrackin // return Promise.resolve(resultMolGroupID); // }); -export const applyDirectSelection = (stage, stageSummaryView) => (dispatch, getState) => { +export const applyDirectSelection = stage => (dispatch, getState) => { const state = getState(); const directDisplay = state.apiReducers.direct_access; @@ -898,10 +898,9 @@ export const applyDirectSelection = (stage, stageSummaryView) => (dispatch, getS if (!directAccessProcessed && directDisplay && directDisplay.molecules && directDisplay.molecules.length > 0) { const allMols = state.apiReducers.all_mol_lists; directDisplay.molecules.forEach(m => { - let keys = Object.keys(allMols); let directProteinNameModded = m.name.toLowerCase(); let directProteinCodeModded = `${directDisplay.target.toLowerCase()}-${directProteinNameModded}`; - for (let molIndex = 0; molIndex < keys.length; molIndex++) { + for (let molIndex = 0; molIndex < allMols.length; molIndex++) { let molList = allMols; let mol = molList[molIndex]; let proteinCodeModded = mol.protein_code.toLowerCase(); diff --git a/js/reducers/api/apiReducers.js b/js/reducers/api/apiReducers.js index f3e36a6f0..d8955af43 100644 --- a/js/reducers/api/apiReducers.js +++ b/js/reducers/api/apiReducers.js @@ -12,7 +12,7 @@ export const INITIAL_STATE = { mol_group_list: [], molecule_list: [], cached_mol_lists: {}, - all_mol_lists: {}, + all_mol_lists: [], allMolecules: [], moleculeTags: [], duck_yank_data: {}, diff --git a/package.json b/package.json index 6b02440ab..a57f755e2 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "fragalysis-frontend", - "version": "0.10.41", + "version": "0.10.42", "description": "Frontend for fragalysis", "main": "webpack.config.js", "scripts": {