improve code

This commit is contained in:
Moriz Wahl 2023-03-06 16:29:35 +01:00
parent 1fa8831110
commit 32aa5892a6

View File

@ -32,8 +32,7 @@ export const mutations = {
}, },
TOGGLE_FILTER_BY_MY_GROUPS(state) { TOGGLE_FILTER_BY_MY_GROUPS(state) {
const filter = clone(state.filter) const filter = clone(state.filter)
const status = get(filter, 'postsInMyGroups') if (get(filter, 'postsInMyGroups')) {
if (status) {
delete filter.postsInMyGroups delete filter.postsInMyGroups
state.filter = filter state.filter = filter
} else { } else {