Skip to content

Commit 9edc6ae

Browse files
Copilotalexr00
andcommitted
Fix: Prevent duplicate :local suffix in contextValue
Co-authored-by: alexr00 <38270282+alexr00@users.noreply.github.com>
1 parent 470f7f2 commit 9edc6ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/view/treeNodes/fileChangeNode.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,10 @@ export class GitFileChangeNode extends FileChangeNode implements vscode.TreeItem
304304

305305
private _appendLocalSuffix() {
306306
// Mark as local file to distinguish from remote files
307-
this.contextValue = `${this.contextValue}:local`;
307+
// Only append if not already present to avoid duplication
308+
if (!this.contextValue.endsWith(':local')) {
309+
this.contextValue = `${this.contextValue}:local`;
310+
}
308311
}
309312

310313
override updateViewed(viewed: ViewedState) {

0 commit comments

Comments
 (0)