diff --git a/client/src/actions/index.js b/client/src/actions/index.js index ff512883..6842accc 100644 --- a/client/src/actions/index.js +++ b/client/src/actions/index.js @@ -561,10 +561,10 @@ export const toggleBlocking = (type, domain) => async (dispatch, getState) => { const matchPreparedUnblockingRule = userRules.match(preparedUnblockingRule); if (matchPreparedBlockingRule) { - dispatch(setRules(userRules.replace(`${blockingRule}`, ''))); + await dispatch(setRules(userRules.replace(`${blockingRule}`, ''))); dispatch(addSuccessToast(i18next.t('rule_removed_from_custom_filtering_toast', { rule: blockingRule }))); } else if (!matchPreparedUnblockingRule) { - dispatch(setRules(`${userRules}${lineEnding}${unblockingRule}\n`)); + await dispatch(setRules(`${userRules}${lineEnding}${unblockingRule}\n`)); dispatch(addSuccessToast(i18next.t('rule_added_to_custom_filtering_toast', { rule: unblockingRule }))); } else if (matchPreparedUnblockingRule) { dispatch(addSuccessToast(i18next.t('rule_added_to_custom_filtering_toast', { rule: unblockingRule }))); diff --git a/client/src/components/Logs/Cells/ClientCell.js b/client/src/components/Logs/Cells/ClientCell.js index 93830faa..da0c9c9b 100644 --- a/client/src/components/Logs/Cells/ClientCell.js +++ b/client/src/components/Logs/Cells/ClientCell.js @@ -59,7 +59,9 @@ const ClientCell = ({ 'btn-outline-danger': !isFiltered, }); - const onClick = () => dispatch(toggleBlocking(buttonType, domain)); + const onClick = async () => { + await dispatch(toggleBlocking(buttonType, domain)); + }; return