Skip to content

Commit a26987b

Browse files
authored
Merge pull request #2327 from RedisInsight/fe/bugfix/RI-4737_graph_command_helper
Fe/bugfix/ri 4737 graph command helper
2 parents fd75f61 + 25c007c commit a26987b

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

redisinsight/ui/src/components/command-helper/CommandHelperWrapper.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ const CommandHelperWrapper = () => {
3737
const lastMatchedCommand = (isEnteringCommand && matchedCommand && !checkDeprecatedModuleCommand(matchedCommand))
3838
? matchedCommand
3939
: searchedCommand
40+
4041
const KEYS_OF_COMMANDS = useMemo(() => removeDeprecatedModuleCommands(commandsArray), [commandsArray])
4142
let searchedCommands: string[] = []
4243

redisinsight/ui/src/utils/cliHelper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ const DEPRECATED_MODULE_GROUPS = [
227227
]
228228

229229
const checkDeprecatedModuleCommand = (command: string) =>
230-
DEPRECATED_MODULE_PREFIXES.some((prefix) => command.startsWith(prefix))
230+
DEPRECATED_MODULE_PREFIXES.some((prefix) => command.toUpperCase().startsWith(prefix))
231231

232232
const checkDeprecatedCommandGroup = (item: string) =>
233233
DEPRECATED_MODULE_GROUPS.some((group) => group === item)

redisinsight/ui/src/utils/tests/cliHelper.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ const checkDeprecatedModuleCommandTests = [
116116
{ input: 'FT.foo bar', expected: false },
117117
{ input: 'GRAPH foo bar', expected: false },
118118
{ input: 'GRAPH.foo bar', expected: true },
119+
{ input: 'graph.foo bar', expected: true },
119120
{ input: 'FOO bar', expected: false },
120121
]
121122

0 commit comments

Comments
 (0)