BUGFIX: Refresh the server info after a contract promise returns (#2281)

This commit is contained in:
Adam Weeden
2025-08-05 23:47:35 -04:00
committed by GitHub
parent 2d8401eaae
commit 13e3ad190d

View File

@@ -512,8 +512,11 @@ export class Terminal {
this.contractOpen = true;
const promptResult = await contract.prompt();
//Check if the contract still exists by the time the promise is fulfilled
if (server.getContract(contractPath) == null) {
// Get a new copy of the server, in case it changed while the prompt was open
const postPromptServer = GetServer(server.hostname);
// Check if the contract still exists by the time the promise is fulfilled
if (postPromptServer?.getContract(contractPath) == null) {
this.contractOpen = false;
return this.error("Contract no longer exists (Was it solved by a script?)");
}