refactor(backend): avoid `as any` on CustomEmojiService.ts (#13903)
This commit is contained in:
parent
e57ce4fa0f
commit
cf670e8a3d
|
@ -346,10 +346,11 @@ export class CustomEmojiService implements OnApplicationShutdown {
|
|||
@bindThis
|
||||
public async populateEmojis(emojiNames: string[], noteUserHost: string | null): Promise<Record<string, string>> {
|
||||
const emojis = await Promise.all(emojiNames.map(x => this.populateEmoji(x, noteUserHost)));
|
||||
const res = {} as any;
|
||||
const res = {} as Record<string, string>;
|
||||
for (let i = 0; i < emojiNames.length; i++) {
|
||||
if (emojis[i] != null) {
|
||||
res[emojiNames[i]] = emojis[i];
|
||||
const resolvedEmoji = emojis[i];
|
||||
if (resolvedEmoji != null) {
|
||||
res[emojiNames[i]] = resolvedEmoji;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
|
|
Loading…
Reference in New Issue