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

Fix standalone crash due to missing apiclient

This commit is contained in:
Bill Thornton 2020-11-22 01:09:18 -05:00
parent f47c042b2e
commit 40dad683d3

View file

@ -42,8 +42,12 @@ function onOpen() {
});
}
const apiClient = ServerConnections.currentApiClient();
try {
const apiClient = ServerConnections.currentApiClient();
if (apiClient && supported()) {
Events.on(apiClient, 'websocketopen', onOpen);
if (apiClient && supported()) {
Events.on(apiClient, 'websocketopen', onOpen);
}
} catch (ex) {
console.warn('Could not get current apiClient', ex);
}