diff --git a/src/store/modules/normalizers.js b/src/store/modules/normalizers.js index a41c4ff5..18d886d7 100644 --- a/src/store/modules/normalizers.js +++ b/src/store/modules/normalizers.js @@ -3,6 +3,8 @@ const nonAtomsObjects = ['match_actor', ':match_actor'] const objects = ['digest', 'pleroma_fe', 'masto_fe', 'poll_limits', 'styling'] const objectParents = ['mascots'] +const groupWithoutKey = settings => settings.noKey ? settings.noKey[1] : false + // REFACTOR export const parseTuples = (tuples, key) => { return tuples.reduce((accum, item) => { @@ -69,7 +71,7 @@ export const valueHasTuples = (key, value) => { export const wrapUpdatedSettings = (group, settings) => { return Object.keys(settings).map((key) => { - const value = wrapValues(settings[key]) + const value = groupWithoutKey(settings[key]) || wrapValues(settings[key]) return { group, key, value } }) } diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index 6c372aed..8e6e65c0 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -85,7 +85,7 @@ const settings = { UpdateSettings({ commit }, { group, key, input, value, type }) { key ? commit('UPDATE_SETTINGS', { group, key, input, value, type }) - : commit('UPDATE_SETTINGS', { group, key: input, input: 'value', value, type }) + : commit('UPDATE_SETTINGS', { group, key: input, input: 'noKey', value, type }) }, UpdateState({ commit }, { group, key, input, value }) { key