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']
|
||||
: 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