From fa0b8552593eb93d6886f94db0d653d74006b605 Mon Sep 17 00:00:00 2001 From: sct Date: Sun, 6 Aug 2023 16:33:53 +0900 Subject: [PATCH] fix: check for plex token being set in availability sync --- server/lib/availabilitySync.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/lib/availabilitySync.ts b/server/lib/availabilitySync.ts index 0a16302cc..38f3fa384 100644 --- a/server/lib/availabilitySync.ts +++ b/server/lib/availabilitySync.ts @@ -42,7 +42,7 @@ class AvailabilitySync { where: { id: 1 }, }); - if (admin) { + if (admin?.plexToken) { this.plexClient = new PlexAPI({ plexToken: admin.plexToken }); } else { logger.error('An admin is not configured.');