logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: 3ca882f883011abbaf3147f5e9f39a094842791e
parent e7307d1e19858aaa6accdd464d475cfbf97c3f38
Author: Henry Jameson <me@hjkos.com>
Date:   Mon, 28 Oct 2024 20:18:58 +0200

properly unset edited properties instead of leaving them as null

Diffstat:

Msrc/components/settings_modal/tabs/style_tab/style_tab.js10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/components/settings_modal/tabs/style_tab/style_tab.js b/src/components/settings_modal/tabs/style_tab/style_tab.js @@ -1,6 +1,6 @@ import { ref, reactive, computed, watch, provide } from 'vue' import { useStore } from 'vuex' -import { get, set } from 'lodash' +import { get, set, unset } from 'lodash' import Select from 'src/components/select/select.vue' import SelectMotion from 'src/components/select/select_motion.vue' @@ -314,7 +314,7 @@ export default { ) set(allEditedRules, getPath(component, directive), fallback ?? defaultValue) } else { - set(allEditedRules, getPath(component, directive), null) + unset(allEditedRules, getPath(component, directive)) } } }) @@ -334,7 +334,11 @@ export default { return postProcess(usedRule) }, set (value) { - set(allEditedRules, getPath(component, directive), value) + if (value) { + set(allEditedRules, getPath(component, directive), value) + } else { + unset(allEditedRules, getPath(component, directive)) + } } })