fix(backend): fix jellyfinHost to not be undefined

Fix jellyfinHost so its not being treated as null or undefined

fix #237
This commit is contained in:
Fallenbagel
2022-10-16 03:50:22 +05:00
parent 0faae20bac
commit ab09664d41
4 changed files with 22 additions and 11 deletions

View File

@@ -501,8 +501,10 @@ router.post(
externalHostname && externalHostname.length > 0
? externalHostname
: hostname;
jellyfinHost = jellyfinHost.endsWith("/") ? jellyfinHost.slice(0, -1) : jellyfinHost;
jellyfinHost = jellyfinHost!.endsWith('/')
? jellyfinHost!.slice(0, -1)
: jellyfinHost;
jellyfinClient.setUserId(admin.jellyfinUserId ?? '');
const jellyfinUsers = await jellyfinClient.getUsers();