Skip to content

Commit

Permalink
fix: local name
Browse files Browse the repository at this point in the history
  • Loading branch information
Baiqiang committed Dec 8, 2023
1 parent ae8a0f7 commit e398328
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function hasRole(user: User, role: Role): boolean {
}

export function localeName(name: string, locale: string): string {
const matches = name.match(/^(.+?) \((.+)\)$/)
const matches = name.match(/^(.+?)\s*\((.+)\)$/)
if (!matches)
return name

Expand Down

0 comments on commit e398328

Please sign in to comment.