[MM-60201] Fixed a potential crash on removing server (#3152)
This commit is contained in:
@@ -208,11 +208,11 @@ export class ServerViewState {
|
||||
this.currentServerId = remainingServers[0].id;
|
||||
}
|
||||
|
||||
ServerManager.removeServer(server.id);
|
||||
|
||||
if (!remainingServers.length) {
|
||||
delete this.currentServerId;
|
||||
}
|
||||
|
||||
ServerManager.removeServer(server.id);
|
||||
}
|
||||
}).catch((e) => {
|
||||
// e is undefined for user cancellation
|
||||
|
Reference in New Issue
Block a user