mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-16 06:18:42 +02:00
BUGFIX: Refresh the server info after a contract promise returns (#2281)
This commit is contained in:
@@ -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?)");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user