Skip to content

Commit 3b8f69b

Browse files
committed
Fixes #3377 adds protection for changes
Props could change because of the `await` calls
1 parent d1075ed commit 3b8f69b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
2929
### Fixed
3030

3131
- Fixes [#3344](https://github.com/gitkraken/vscode-gitlens/issues/3344) - Make changing the AI key easier
32+
- Fixes [#3377](https://github.com/gitkraken/vscode-gitlens/issues/3377) - Cannot read properties of undefined (reading 'start')
3233
- Fixes fixes issue with Jira integration not refreshing
3334

3435
## [15.1.0] - 2024-06-05

src/views/nodes/lineHistoryTrackerNode.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export class LineHistoryTrackerNode extends SubscribeableViewNode<
5959
return [];
6060
}
6161

62-
if (this._selection == null) {
62+
const selection = this._selection;
63+
const editorContents = this._editorContents;
64+
65+
if (selection == null) {
6366
this.view.description = undefined;
6467

6568
this.view.message = 'There was no selection provided for line history.';
@@ -90,7 +93,7 @@ export class LineHistoryTrackerNode extends SubscribeableViewNode<
9093
filter: b => b.name === commitish.sha,
9194
}));
9295
}
93-
this.child = new LineHistoryNode(fileUri, this.view, this, branch, this._selection, this._editorContents);
96+
this.child = new LineHistoryNode(fileUri, this.view, this, branch, selection, editorContents);
9497
}
9598

9699
return this.child.getChildren();

0 commit comments

Comments
 (0)