Merge pull request #2665 from dmitrylyzo/fix-server-hash-change

Add connection response handling
This commit is contained in:
Bill Thornton 2021-05-26 14:59:44 -04:00 committed by GitHub
commit eb79a8e045
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -503,7 +503,8 @@ class AppRouter {
const firstResult = this.firstConnectionResult;
this.firstConnectionResult = null;
if (firstResult && firstResult.State === 'ServerSignIn') {
if (firstResult) {
if (firstResult.State === 'ServerSignIn') {
const url = firstResult.ApiClient.serverAddress() + '/System/Info/Public';
fetch(url).then(response => {
if (!response.ok) return Promise.reject('fetch failed');
@ -520,6 +521,10 @@ class AppRouter {
});
return;
} else if (firstResult.State !== 'SignedIn') {
this.handleConnectionResult(firstResult);
return;
}
}
const apiClient = ServerConnections.currentApiClient();