forked from AkkomaGang/admin-fe
Add null check
This commit is contained in:
parent
7f85e78630
commit
b37aaac9d6
1 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ export const wrapConfig = settings => {
|
||||||
? settings[config]['value']
|
? settings[config]['value']
|
||||||
: Object.keys(settings[config]).reduce((acc, settingName) => {
|
: Object.keys(settings[config]).reduce((acc, settingName) => {
|
||||||
const data = settings[config][settingName]
|
const data = settings[config][settingName]
|
||||||
if (data === '') {
|
if (data === null || data === '') {
|
||||||
return acc
|
return acc
|
||||||
} else if (key === ':rate_limit') {
|
} else if (key === ':rate_limit') {
|
||||||
return [...acc, { 'tuple': [`:${settingName}`, data] }]
|
return [...acc, { 'tuple': [`:${settingName}`, data] }]
|
||||||
|
@ -164,7 +164,7 @@ export const wrapConfig = settings => {
|
||||||
const wrapNestedTuples = setting => {
|
const wrapNestedTuples = setting => {
|
||||||
return Object.keys(setting).reduce((acc, settingName) => {
|
return Object.keys(setting).reduce((acc, settingName) => {
|
||||||
const data = setting[settingName]
|
const data = setting[settingName]
|
||||||
if (data === '') {
|
if (data === null || data === '') {
|
||||||
return acc
|
return acc
|
||||||
} else if (settingName === 'ip') {
|
} else if (settingName === 'ip') {
|
||||||
const ip = data.split('.')
|
const ip = data.split('.')
|
||||||
|
|
Loading…
Reference in a new issue