aboutsummaryrefslogtreecommitdiffstats
path: root/ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js
diff options
context:
space:
mode:
authorsebdet <sebastien.determe@intl.att.com>2020-04-23 15:17:59 +0200
committersebdet <sebastien.determe@intl.att.com>2020-04-23 15:17:59 +0200
commite7c9326c63077634c5aa68940f5c24677177c9d6 (patch)
tree528b267d5513fd070618bbe48c80f0aa58a92dde /ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js
parent703527a65ba4d389ad2c93310363d7ff9352a281 (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/ManageDictionaries/ManageDictionaries.js')
-rw-r--r--ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js12
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 2af1b7ce..71477ae0 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>