Skip to content

Commit

Permalink
fix wordMatches array for ToolSearch
Browse files Browse the repository at this point in the history
make sure, it is a Set (no duplicate matches)
  • Loading branch information
ahmedhamidawan committed Oct 23, 2023
1 parent af7b6f4 commit 9d248c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/components/Panels/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ export function searchToolsByKeys(
? keys.startsWith
: order;

const wordMatches = actualValueWords.filter((word) => queryWords.includes(word));
const wordMatches = Array.from(new Set(actualValueWords.filter((word) => queryWords.includes(word))));
if (!usesDL) {
if (actualValue.match(queryValue)) {
// if string.match() returns true, matching tool found
Expand Down

0 comments on commit 9d248c3

Please sign in to comment.