aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/shared-actor-image/actor-avatar.component.ts')
-rw-r--r--client/src/app/shared/shared-actor-image/actor-avatar.component.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
index f1c1aa03f..ab2e02ad7 100644
--- a/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
+++ b/client/src/app/shared/shared-actor-image/actor-avatar.component.ts
@@ -1,6 +1,7 @@
1import { Component, Input, OnChanges, OnInit } from '@angular/core' 1import { Component, Input, OnChanges, OnInit } from '@angular/core'
2import { VideoChannel } from '../shared-main' 2import { VideoChannel } from '../shared-main'
3import { Account } from '../shared-main/account/account.model' 3import { Account } from '../shared-main/account/account.model'
4import { objectKeysTyped } from '@shared/core-utils'
4 5
5type ActorInput = { 6type ActorInput = {
6 name: string 7 name: string
@@ -154,8 +155,8 @@ export class ActorAvatarComponent implements OnInit, OnChanges {
154 'wxyz': 'dark-blue' 155 'wxyz': 'dark-blue'
155 } 156 }
156 157
157 const theme = Object.keys(themes) 158 const theme = objectKeysTyped(themes)
158 .find(chars => chars.includes(initialLowercase)) 159 .find(chars => chars.includes(initialLowercase))
159 160
160 return themes[theme] || 'blue' 161 return themes[theme] || 'blue'
161 } 162 }