Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix(agent): handle isOpen null during agent close
Browse files Browse the repository at this point in the history
blakebyrnes committed Mar 11, 2024

Verified

This commit was signed with the committer’s verified signature.
RaphiMC RK_01
1 parent 35b5378 commit e75c907
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agent/main/lib/Agent.ts
Original file line number Diff line number Diff line change
@@ -142,9 +142,9 @@ export default class Agent extends TypedEventEmitter<{ close: void }> {
return await this.createBrowserContext(browser);
} catch (err) {
await this.close();
this.isOpen.reject(err);
this.isOpen?.reject(err);
} finally {
this.isOpen.resolve(this.browserContext);
this.isOpen?.resolve(this.browserContext);
}
return this.isOpen;
}

0 comments on commit e75c907

Please sign in to comment.