Skip to content

Commit fd0bb9a

Browse files
committed
:chore: Use toLowerCase() instead of toLocaleLowerCase() for stable ID comparisons (#2446)
1 parent f1584a7 commit fd0bb9a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/utils/authorship.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ export const isAdmin = (role: Roles): boolean => {
192192
};
193193

194194
export const hasAuthority = (userId: string, authorId: string): boolean => {
195-
return userId.toLocaleLowerCase() === authorId.toLocaleLowerCase();
195+
return userId.toLowerCase() === authorId.toLowerCase();
196196
};
197197

198198
// Note: 公開 + 非公開(本人のみ)の問題集が閲覧できる

0 commit comments

Comments
 (0)