Skip to content

Commit 13c9eda

Browse files
HaroenvCompuIves
authored andcommitted
fix(contributors): make the showing of contributor badge case insensitive (codesandbox#925)
* Update computed.js * Update computed.js
1 parent 6047bf5 commit 13c9eda

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
export function isContributor(username: string) {
2-
return this.contributors.indexOf(username) > -1;
2+
return (
3+
this.contributors.findIndex(
4+
contributor =>
5+
contributor.toLocaleLowerCase() === username.toLocaleLowerCase()
6+
) > -1
7+
);
38
}

0 commit comments

Comments
 (0)