Skip to content

Commit 25c007c

Browse files
#RI-4737 - add uppercase
1 parent f1917bb commit 25c007c

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ const CommandHelperWrapper = () => {
3434
} = useSelector(cliSettingsSelector)
3535
const { spec: ALL_REDIS_COMMANDS, commandsArray } = useSelector(appRedisCommandsSelector)
3636
const { instanceId = '' } = useParams<{ instanceId: string }>()
37-
const lastMatchedCommand = (
38-
isEnteringCommand
39-
&& matchedCommand
40-
&& !checkDeprecatedModuleCommand(matchedCommand.toUpperCase())
41-
)
37+
const lastMatchedCommand = (isEnteringCommand && matchedCommand && !checkDeprecatedModuleCommand(matchedCommand))
4238
? matchedCommand
4339
: searchedCommand
4440

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)