Skip to content

Commit

Permalink
#41 fix uncheck of compounds
Browse files Browse the repository at this point in the history
  • Loading branch information
tibor-postek-m2ms committed Mar 2, 2020
1 parent 55c5cdc commit 62900d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/components/preview/compounds/redux/dispatchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ export const handleClickOnCompound = ({ data, event, majorViewStage }) => async
}
} else {
Object.keys(selectedCompoundsClass).forEach(async classKey => {
let isNotSelected = selectedCompoundsClass[classKey].find(item => item === data.index).length === 0;
if (isNotSelected === false) {
let isNotSelected = await selectedCompoundsClass[classKey].find(item => item === data.index);
if (isNotSelected.length > 0) {
await dispatch(removeSelectedCompoundClass(data.index));
dispatch(removeFromToBuyList(data));
} else {
Expand Down

0 comments on commit 62900d8

Please sign in to comment.