From 11746e37544c98b8b56242b974c430480872e546 Mon Sep 17 00:00:00 2001 From: MagicalCodeMonkey Date: Fri, 24 Apr 2020 11:29:39 -0400 Subject: [PATCH] Handle an error when refreshing the servers list --- src/store/modules/plex/helpers/PlexServer.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/store/modules/plex/helpers/PlexServer.js b/src/store/modules/plex/helpers/PlexServer.js index 1c855623..1be0425a 100644 --- a/src/store/modules/plex/helpers/PlexServer.js +++ b/src/store/modules/plex/helpers/PlexServer.js @@ -161,7 +161,12 @@ module.exports = function PlexServer() { if (!(blur > 0)) { blur = 0; } - return `${this.chosenConnection.uri}/photo/:/transcode?url=${location}&X-Plex-Token=${this.accessToken}&height=${Math.floor(height)}&width=${Math.floor(width)}&blur=${blur}`; + if(this.chosenConnection) { + return `${this.chosenConnection.uri}/photo/:/transcode?url=${location}&X-Plex-Token=${this.accessToken}&height=${Math.floor(height)}&width=${Math.floor(width)}&blur=${blur}`; + } + else { + return ``; + } }; this.getRandomItem = async function () { try {