1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix complexity warnings in user routes

This commit is contained in:
Bill Thornton 2023-04-26 12:32:15 -04:00
parent 8f730b8270
commit 9c128b8c10
4 changed files with 31 additions and 51 deletions

View file

@ -30,12 +30,8 @@ const UserProfile: FunctionComponent = () => {
loading.show();
window.ApiClient.getUser(userId).then(function (user) {
if (!user.Name) {
throw new Error('Unexpected null user.Name');
}
if (!user.Id) {
throw new Error('Unexpected null user.Id');
if (!user.Name || !user.Id) {
throw new Error('Unexpected null user name or id');
}
setUserName(user.Name);