Commit b37aaac9 authored by kPherox's avatar kPherox

Add null check

parent 7f85e786
......@@ -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('.')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment