Skip to content

Commit 45b2ede

Browse files
author
Roman.Sergeenko
committed
#RI-2212 - update regex for getVisualizationsByCommand
1 parent 4adb78d commit 45b2ede

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

redisinsight/ui/src/utils/plugins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { getBaseApiUrl } from 'uiSrc/utils/common'
44
export const getVisualizationsByCommand = (query: string, visualizations: IPluginVisualization[]) =>
55
visualizations.filter((visualization: IPluginVisualization) =>
66
visualization.matchCommands.some((matchCommand) =>
7-
query.startsWith(matchCommand) || (new RegExp(matchCommand.toLowerCase())).test(query.toLowerCase())))
7+
query.startsWith(matchCommand) || (new RegExp(`^${matchCommand}`, 'i')).test(query)))
88

99
export const urlForAsset = (basePluginUrl: string, path: string) => {
1010
const baseApiUrl = getBaseApiUrl()

0 commit comments

Comments
 (0)