diff options
author | sebdet <sebastien.determe@intl.att.com> | 2020-04-23 15:17:59 +0200 |
---|---|---|
committer | sebdet <sebastien.determe@intl.att.com> | 2020-04-23 15:17:59 +0200 |
commit | e7c9326c63077634c5aa68940f5c24677177c9d6 (patch) | |
tree | 528b267d5513fd070618bbe48c80f0aa58a92dde /ui-react/src/components/dialogs | |
parent | 703527a65ba4d389ad2c93310363d7ff9352a281 (diff) |
Fix bugs reported by sonar
Fix bugs reported by sonar as critical, major, ...
Issue-ID: CLAMP-841
Signed-off-by: sebdet <sebastien.determe@intl.att.com>
Change-Id: Id525d532d4f405216da44f95503e06e172458e70
Diffstat (limited to 'ui-react/src/components/dialogs')
-rw-r--r-- | ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js b/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js index 2af1b7ce4..71477ae0c 100644 --- a/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js +++ b/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js @@ -88,11 +88,13 @@ function SubDict(props) { const {onChange} = props; const subDicts = []; subDicts.push('Default'); - for(var item in dictList) { - if(dictList[item].secondLevelDictionary === 1) { - subDicts.push(dictList[item].name); - } - }; + if (dictList != "undefined" && dictList.length > 0) { + for(var item in dictList) { + if(dictList[item].secondLevelDictionary === 1) { + subDicts.push(dictList[item].name); + } + }; + } subDicts.push(''); var optionItems = subDicts.map( (item) => <option key={item}>{item}</option> |