[MM-60201] Fixed a potential crash on removing server (#3152)

This commit is contained in:
Devin Binnie
2024-09-23 08:42:19 -04:00
committed by GitHub
parent 3b179c7ec2
commit c6b68a82b9

View File

@@ -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