Skip to content
Snippets Groups Projects
Verified Commit b37aaac9 authored by kPherox's avatar kPherox
Browse files

Add null check

parent 7f85e786
No related branches found
No related tags found
No related merge requests found
......@@ -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('.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment