1
0
forked from mirror/misskey

cleanup(ApPersonService.ts): 不必要な三項演算子を削除

This commit is contained in:
okayurisotto 2023-07-03 20:24:34 +09:00
parent 09f67204b1
commit eb0607ec8b

View File

@ -347,12 +347,12 @@ export class ApPersonService implements OnModuleInit {
return this.apImageService.resolveImage(user, img).catch(() => null);
}));
const avatarId = avatar ? avatar.id : null;
const bannerId = banner ? banner.id : null;
const avatarId = avatar?.id ?? null;
const bannerId = banner?.id ?? null;
const avatarUrl = avatar ? this.driveFileEntityService.getPublicUrl(avatar, 'avatar') : null;
const bannerUrl = banner ? this.driveFileEntityService.getPublicUrl(banner) : null;
const avatarBlurhash = avatar ? avatar.blurhash : null;
const bannerBlurhash = banner ? banner.blurhash : null;
const avatarBlurhash = avatar?.blurhash ?? null;
const bannerBlurhash = banner?.blurhash ?? null;
await this.usersRepository.update(user.id, {
avatarId,