fix(api): return proper json objects (#3544)
This commit is contained in:
parent
5b36357133
commit
257a102127
19 changed files with 364 additions and 350 deletions
|
|
@ -343,10 +343,7 @@
|
|||
this.$forceUpdate()
|
||||
},
|
||||
serialize() {
|
||||
let config = JSON.parse(JSON.stringify(this.config));
|
||||
config.global_prep_cmd = JSON.stringify(config.global_prep_cmd);
|
||||
config.dd_mode_remapping = JSON.stringify(config.dd_mode_remapping);
|
||||
return config;
|
||||
return JSON.parse(JSON.stringify(this.config));
|
||||
},
|
||||
save() {
|
||||
this.saved = false;
|
||||
|
|
@ -360,17 +357,8 @@
|
|||
Object.keys(tab.options).forEach(optionKey => {
|
||||
let delete_value = false
|
||||
|
||||
if (["global_prep_cmd", "dd_mode_remapping"].includes(optionKey)) {
|
||||
const config_value = config[optionKey]
|
||||
const default_value = JSON.stringify(tab.options[optionKey])
|
||||
|
||||
if (config_value === default_value) {
|
||||
delete_value = true
|
||||
}
|
||||
}
|
||||
|
||||
// todo: add proper type checking
|
||||
if (String(config[optionKey]) === String(tab.options[optionKey])) {
|
||||
if (JSON.stringify(config[optionKey]) === JSON.stringify(tab.options[optionKey])) {
|
||||
delete_value = true
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue