Skip to content

Commit c186fba

Browse files
author
Roman.Sergeenko
committed
#RI-2063 - add validation for command groups
1 parent aa5d267 commit c186fba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

redisinsight/ui/src/slices/app/redis-commands.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { createSlice } from '@reduxjs/toolkit'
2-
import { uniqBy } from 'lodash'
2+
import { isString, uniqBy } from 'lodash'
33
import { apiService } from 'uiSrc/services'
44
import { ApiEndpoints, ICommand, ICommands } from 'uiSrc/constants'
55
import { getApiErrorMessage, isStatusSuccessful } from 'uiSrc/utils'
@@ -30,6 +30,7 @@ const appRedisCommandsSlice = createSlice({
3030
state.commandsArray = Object.keys(state.spec).sort()
3131
state.commandGroups = uniqBy(Object.values(payload), 'group')
3232
.map((item: ICommand) => item.group)
33+
.filter((group: string) => isString(group))
3334
},
3435
getRedisCommandsFailure: (state, { payload }) => {
3536
state.loading = false

0 commit comments

Comments
 (0)