commit: b3d0360699d2c4a05f92cdbc58493afc2aa55f7a
parent ed34b07b3f5e902a59638e3c1fd138a5d90d2d03
Author: Henry Jameson <me@hjkos.com>
Date: Wed, 24 May 2023 11:44:41 +0300
fix and cleanup reset button
Diffstat:
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/components/settings_modal/helpers/setting.js b/src/components/settings_modal/helpers/setting.js
@@ -1,7 +1,7 @@
import ModifiedIndicator from './modified_indicator.vue'
import ProfileSettingIndicator from './profile_setting_indicator.vue'
import DraftButtons from './draft_buttons.vue'
-import { get, set } from 'lodash'
+import { get, set, cloneDeep } from 'lodash'
export default {
components: {
@@ -218,13 +218,10 @@ export default {
}
},
reset () {
- console.log('reset')
if (this.realDraftMode) {
- console.log(this.draft)
- console.log(this.state)
- this.draft = this.state
+ this.draft = cloneDeep(this.state)
} else {
- set(this.$store.getters.mergedConfig, this.path, this.defaultState)
+ set(this.$store.getters.mergedConfig, this.path, cloneDeep(this.defaultState))
}
},
hardReset () {