Skip to content

Commit 0077fd4

Browse files
author
Kristiyan Ivanov
authored
Simplified check based on suggestion from Roman
1 parent a7325cd commit 0077fd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redisinsight/ui/src/pages/browser/components/create-redisearch-index/CreateRedisearchIndex.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const keyTypeOptions = KEY_TYPE_OPTIONS.map((item) => {
5656
const initialFieldValue = (fieldTypeOptions: EuiSuperSelectOption<string>[], id = 0) => ({
5757
id,
5858
identifier: '',
59-
fieldType: fieldTypeOptions.length > 0 ? fieldTypeOptions[0].value : ''
59+
fieldType: fieldTypeOptions[0]?.value || ''
6060
})
6161

6262
const CreateRedisearchIndex = ({ onClosePanel, onCreateIndex }: Props) => {

0 commit comments

Comments
 (0)