Skip to content

Commit

Permalink
show correct name when searching for full name
Browse files Browse the repository at this point in the history
  • Loading branch information
c3024 committed Dec 22, 2023
1 parent b966bd4 commit 7861516
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/GetStyledTextArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const getStyledTextArray = (name: string, prefix: string): StyledText[] => {
const prefixLocation = name.toLowerCase().search(Str.escapeForRegExp(prefixLowercase));

if (prefixLocation === 0 && prefix.length === name.length) {
texts.push({text: prefixLowercase, isColored: true});
texts.push({text: name, isColored: true});
} else if (prefixLocation === 0 && prefix.length !== name.length) {
texts.push({text: name.slice(0, prefix.length), isColored: true}, {text: name.slice(prefix.length), isColored: false});
} else if (prefixLocation > 0 && prefix.length !== name.length) {
Expand Down

0 comments on commit 7861516

Please sign in to comment.