Fix not respecting contributor badge preference (#3443)

This commit is contained in:
Ataraxis 2025-05-28 15:24:48 +01:00 committed by GitHub
parent 76b1fe9a87
commit b706d53998
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View file

@ -92,6 +92,7 @@ export function identity<T>(value: T): T {
export const isMobile = navigator.userAgent.includes("Mobi");
export const isPluginDev = (id: string) => Object.hasOwn(DevsById, id);
export const shouldShowContributorBadge = (id: string) => isPluginDev(id) && DevsById[id].badge !== false;
export function pluralise(amount: number, singular: string, plural = singular + "s") {
return amount === 1 ? `${amount} ${singular}` : `${amount} ${plural}`;