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:
parent
f47c042b2e
commit
40dad683d3
1 changed files with 7 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue