fix(coding-agent): prevented post-disposal state updates and callbacks
- Prevented updating the default branch and triggering callbacks after the component is disposed.
This commit is contained in:
@@ -395,7 +395,7 @@ export class StatusLineComponent implements Component {
|
||||
this.#defaultBranch = "main";
|
||||
(async () => {
|
||||
const resolved = await git.branch.default(getProjectDir());
|
||||
|
||||
if (this.#disposed) return;
|
||||
if (resolved) {
|
||||
this.#defaultBranch = resolved;
|
||||
if (this.#onBranchChange) {
|
||||
|
||||
Reference in New Issue
Block a user