Skip to content

Commit 15f5a1f

Browse files
committed
Closes #342 - adds protection for undefined message
1 parent 9c5c5bf commit 15f5a1f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
1515
### Fixed
1616
- Fixes [#345](https://github.com/eamodio/vscode-gitlens/issues/345) - Custom date formats don't work in the GitLens view
1717
- Fixes [#336](https://github.com/eamodio/vscode-gitlens/issues/336) - Default Settings Get Added Automatically
18+
- Fixes [#342](https://github.com/eamodio/vscode-gitlens/issues/342) - GitLens crashes while debugging with Chrome Debugger a larger project
1819
- Fixes issue where username and/or password in a remote urls could be shown
1920

2021
## [8.2.1] - 2018-04-11

src/annotations/blameAnnotationProvider.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
130130
if (commit === undefined) return undefined;
131131

132132
const hover = await Annotations.changesHover(commit, position.line, await GitUri.fromUri(document.uri));
133-
return new Hover(hover.hoverMessage!, document.validateRange(new Range(position.line, 0, position.line, RangeEndOfLineIndex)));
133+
if (hover.hoverMessage === undefined) return undefined;
134+
135+
return new Hover(hover.hoverMessage, document.validateRange(new Range(position.line, 0, position.line, RangeEndOfLineIndex)));
134136
}
135137

136138
private async getCommitForHover(position: Position): Promise<GitCommit | undefined> {

src/annotations/recentChangesAnnotationProvider.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
6363

6464
if (cfg.hovers.annotations.changes) {
6565
message = Annotations.getHoverDiffMessage(commit, this._uri, line);
66+
if (message === undefined) continue;
6667
}
6768
}
6869

0 commit comments

Comments
 (0)