fix: freeze Resource#command (#158579)

Fixes: #157904
This commit is contained in:
João Moreno 2022-08-19 14:24:36 +02:00 committed by GitHub
parent a3f5d2437b
commit 6dbddd8b91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,6 +87,7 @@ export class Resource implements SourceControlResourceState {
return this.resources[1];
}
@memoize
get command(): Command {
return this._commandResolver.resolveDefaultCommand(this);
}
@ -938,8 +939,7 @@ export class Repository implements Disposable {
workspace.onDidChangeConfiguration(e => {
if (e.affectsConfiguration('git.mergeEditor')) {
// this.mergeGroup.resourceStates = this.mergeGroup.resourceStates.map(r => r.clone());
this.status();
this.mergeGroup.resourceStates = this.mergeGroup.resourceStates.map(r => r.clone());
}
}, undefined, this.disposables);