This commit is contained in:
syuilo
2018-06-10 08:34:46 +09:00
parent 16d4b16872
commit bee77afb7f
2 changed files with 17 additions and 10 deletions

View File

@@ -405,13 +405,17 @@ export const pack = (
delete _user.publicKey;
}
_user.avatarUrl = _user.avatarId != null
? `${config.drive_url}/${_user.avatarId}`
: `${config.drive_url}/default-avatar.jpg`;
if (_user.avatarUrl == null) {
_user.avatarUrl = _user.avatarId != null
? `${config.drive_url}/${_user.avatarId}`
: `${config.drive_url}/default-avatar.jpg`;
}
_user.bannerUrl = _user.bannerId != null
? `${config.drive_url}/${_user.bannerId}`
: null;
if (_user.bannerUrl == null) {
_user.bannerUrl = _user.bannerId != null
? `${config.drive_url}/${_user.bannerId}`
: null;
}
_user.wallpaperUrl = _user.wallpaperId != null
? `${config.drive_url}/${_user.wallpaperId}`