Skip to content

Commit

Permalink
[MM-60201] Fixed a potential crash on removing server
Browse files Browse the repository at this point in the history
  • Loading branch information
devinbinnie committed Sep 20, 2024
1 parent b4eeabb commit b6bf2d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/serverViewState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b6bf2d1

Please sign in to comment.