|
@ -181,8 +181,6 @@ export class CompareBranchNode extends ViewNode |
|
|
|
|
|
|
|
|
@log() |
|
|
@log() |
|
|
async clear() { |
|
|
async clear() { |
|
|
if (this._compareWith == null) return; |
|
|
|
|
|
|
|
|
|
|
|
this._compareWith = undefined; |
|
|
this._compareWith = undefined; |
|
|
await this.updateCompareWith(undefined); |
|
|
await this.updateCompareWith(undefined); |
|
|
|
|
|
|
|
@ -354,6 +352,8 @@ export class CompareBranchNode extends ViewNode |
|
|
WorkspaceState.BranchComparisons, |
|
|
WorkspaceState.BranchComparisons, |
|
|
); |
|
|
); |
|
|
if (comparisons == null) { |
|
|
if (comparisons == null) { |
|
|
|
|
|
if (compareWith == null) return; |
|
|
|
|
|
|
|
|
comparisons = Object.create(null) as BranchComparisons; |
|
|
comparisons = Object.create(null) as BranchComparisons; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -362,6 +362,8 @@ export class CompareBranchNode extends ViewNode |
|
|
if (compareWith != null) { |
|
|
if (compareWith != null) { |
|
|
comparisons[id] = { ...compareWith }; |
|
|
comparisons[id] = { ...compareWith }; |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
if (comparisons[id] == null) return; |
|
|
|
|
|
|
|
|
const { [id]: _, ...rest } = comparisons; |
|
|
const { [id]: _, ...rest } = comparisons; |
|
|
comparisons = rest; |
|
|
comparisons = rest; |
|
|
} |
|
|
} |
|
|