From 7861516992084de1eec0301d0715310d8f41ba7b Mon Sep 17 00:00:00 2001 From: c3024 Date: Fri, 22 Dec 2023 08:46:20 +0530 Subject: [PATCH] show correct name when searching for full name --- src/libs/GetStyledTextArray.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/GetStyledTextArray.ts b/src/libs/GetStyledTextArray.ts index cdcedbac2a4f..9bc6ccc33b4c 100644 --- a/src/libs/GetStyledTextArray.ts +++ b/src/libs/GetStyledTextArray.ts @@ -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) {