Merge pull request #2097 from thornbill/fix-standalone-crash
Fix standalone crash due to missing apiclient
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user