Merge pull request #2097 from thornbill/fix-standalone-crash

Fix standalone crash due to missing apiclient
This commit is contained in:
Bill Thornton
2020-11-22 02:00:36 -05:00
committed by GitHub
+7 -3
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);
}