Fixes
This commit is contained in:
parent
05875413f9
commit
00211a604f
3 changed files with 9 additions and 4 deletions
|
|
@ -69,7 +69,11 @@ const getUserName = (user: IUser): string => {
|
|||
return match.replaceAll("@", "");
|
||||
};
|
||||
|
||||
const getUserFromMention = (mention: string): IUser | undefined => {
|
||||
const getUserFromMention = (mention: string | undefined): IUser | undefined => {
|
||||
if (!mention) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
const regex = /\[\@\S*:aslan2142.space\]/;
|
||||
const match = mention
|
||||
.match(regex)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue