File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,7 +163,9 @@ export class FileChangeNode extends TreeNode implements vscode.TreeItem {
163163 let current = this . parent ;
164164 while ( current instanceof TreeNode ) {
165165 // CommitNode has contextValue set to 'commit'
166- if ( ( current as vscode . TreeItem ) . contextValue === 'commit' ) {
166+ // Since TreeNode doesn't define contextValue, we check if it exists and equals 'commit'
167+ const treeItem = current as { contextValue ?: string } ;
168+ if ( treeItem . contextValue === 'commit' ) {
167169 return true ;
168170 }
169171 current = current . parent ;
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export namespace TreeUtils {
3535 continue ;
3636 }
3737 if ( ! checkedNodes . includes ( selected ) && ! uncheckedNodes . includes ( selected ) ) {
38+ // Only process files that have checkboxes (files without checkboxState, like those under commits, are skipped)
3839 if ( selected . checkboxState ?. state === vscode . TreeItemCheckboxState . Unchecked ) {
3940 checkedNodes . push ( selected ) ;
4041 } else if ( selected . checkboxState ?. state === vscode . TreeItemCheckboxState . Checked ) {
You can’t perform that action at this time.
0 commit comments