settings helpers
This commit is contained in:
parent
f27d21908a
commit
d15de42a75
4 changed files with 195 additions and 17 deletions
|
@ -27,9 +27,9 @@ const save = (settings) => {
|
|||
const set = (settings) => {
|
||||
let value = JSON.parse(DefaultSettings.json);
|
||||
if (settings.source === 'json') {
|
||||
value = settingsValues.fromJson(settings.json);
|
||||
value = settingsValues.valueFromJson(settings.json);
|
||||
} else if (settings.source === 'form') {
|
||||
value = settingsValues.fromForm(settings.form);
|
||||
value = settingsValues.valueFromForm(settings.form);
|
||||
}
|
||||
|
||||
return {
|
||||
|
|
Reference in a new issue