Merge branch 'fix-setting-error' into 'master'
Fixed there can't be submitted settings See merge request pleroma/admin-fe!28
This commit is contained in:
commit
c9684059ca
1 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ export const wrapConfig = settings => {
|
|||
? settings[config]['value']
|
||||
: Object.keys(settings[config]).reduce((acc, settingName) => {
|
||||
const data = settings[config][settingName]
|
||||
if (data === '') {
|
||||
if (data === null || data === '') {
|
||||
return acc
|
||||
} else if (key === ':rate_limit') {
|
||||
return [...acc, { 'tuple': [`:${settingName}`, data] }]
|
||||
|
@ -164,7 +164,7 @@ export const wrapConfig = settings => {
|
|||
const wrapNestedTuples = setting => {
|
||||
return Object.keys(setting).reduce((acc, settingName) => {
|
||||
const data = setting[settingName]
|
||||
if (data === '') {
|
||||
if (data === null || data === '') {
|
||||
return acc
|
||||
} else if (settingName === 'ip') {
|
||||
const ip = data.split('.')
|
||||
|
|
Loading…
Reference in a new issue