From b37aaac9d60384a2fbd89964abe8cde5674cd4c2 Mon Sep 17 00:00:00 2001 From: kPherox Date: Sat, 10 Aug 2019 02:05:43 +0900 Subject: [PATCH] Add null check --- src/store/modules/normalizers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/modules/normalizers.js b/src/store/modules/normalizers.js index 37d17b62..f6a70067 100644 --- a/src/store/modules/normalizers.js +++ b/src/store/modules/normalizers.js @@ -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('.')