diff options
Diffstat (limited to 'ui-react/src/components/dialogs/ManageDictionaries/ManageDictionaries.js')
-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> |