File tree Expand file tree Collapse file tree 3 files changed +3
-6
lines changed
components/command-helper Expand file tree Collapse file tree 3 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,7 @@ const CommandHelperWrapper = () => {
34
34
} = useSelector ( cliSettingsSelector )
35
35
const { spec : ALL_REDIS_COMMANDS , commandsArray } = useSelector ( appRedisCommandsSelector )
36
36
const { instanceId = '' } = useParams < { instanceId : string } > ( )
37
- const lastMatchedCommand = (
38
- isEnteringCommand
39
- && matchedCommand
40
- && ! checkDeprecatedModuleCommand ( matchedCommand . toUpperCase ( ) )
41
- )
37
+ const lastMatchedCommand = ( isEnteringCommand && matchedCommand && ! checkDeprecatedModuleCommand ( matchedCommand ) )
42
38
? matchedCommand
43
39
: searchedCommand
44
40
Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ const DEPRECATED_MODULE_GROUPS = [
227
227
]
228
228
229
229
const checkDeprecatedModuleCommand = ( command : string ) =>
230
- DEPRECATED_MODULE_PREFIXES . some ( ( prefix ) => command . startsWith ( prefix ) )
230
+ DEPRECATED_MODULE_PREFIXES . some ( ( prefix ) => command . toUpperCase ( ) . startsWith ( prefix ) )
231
231
232
232
const checkDeprecatedCommandGroup = ( item : string ) =>
233
233
DEPRECATED_MODULE_GROUPS . some ( ( group ) => group === item )
Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ const checkDeprecatedModuleCommandTests = [
116
116
{ input : 'FT.foo bar' , expected : false } ,
117
117
{ input : 'GRAPH foo bar' , expected : false } ,
118
118
{ input : 'GRAPH.foo bar' , expected : true } ,
119
+ { input : 'graph.foo bar' , expected : true } ,
119
120
{ input : 'FOO bar' , expected : false } ,
120
121
]
121
122
You can’t perform that action at this time.
0 commit comments