From caafdb2fe7b98e8cbf12e89754d3cbbbff323df6 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 17 Oct 2023 18:49:33 -0400 Subject: [PATCH] fix: Ensure initials on avatars are always displayed uppercase --- app/models/Collection.ts | 2 +- app/models/Team.ts | 2 +- app/models/User.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/Collection.ts b/app/models/Collection.ts index 38e738a48..eb6b0c7ec 100644 --- a/app/models/Collection.ts +++ b/app/models/Collection.ts @@ -133,7 +133,7 @@ export default class Collection extends ParanoidModel { */ @computed get initial() { - return this.name ? this.name[0] : "?"; + return (this.name ? this.name[0] : "?").toUpperCase(); } fetchDocuments = async (options?: { force: boolean }) => { diff --git a/app/models/Team.ts b/app/models/Team.ts index 09179143c..76e658d01 100644 --- a/app/models/Team.ts +++ b/app/models/Team.ts @@ -80,7 +80,7 @@ class Team extends Model { @computed get initial(): string { - return this.name ? this.name[0] : "?"; + return (this.name ? this.name[0] : "?").toUpperCase(); } /** diff --git a/app/models/User.ts b/app/models/User.ts index 4c32c5e0e..e1814ac6c 100644 --- a/app/models/User.ts +++ b/app/models/User.ts @@ -61,7 +61,7 @@ class User extends ParanoidModel { @computed get initial(): string { - return this.name ? this.name[0] : "?"; + return (this.name ? this.name[0] : "?").toUpperCase(); } @computed