Browse Source

Closes #342 - adds protection for undefined message

main
Eric Amodio 6 years ago
parent
commit
15f5a1fdc9
3 changed files with 5 additions and 1 deletions
  1. +1
    -0
      CHANGELOG.md
  2. +3
    -1
      src/annotations/blameAnnotationProvider.ts
  3. +1
    -0
      src/annotations/recentChangesAnnotationProvider.ts

+ 1
- 0
CHANGELOG.md View File

@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
### Fixed
- Fixes [#345](https://github.com/eamodio/vscode-gitlens/issues/345) - Custom date formats don't work in the GitLens view
- Fixes [#336](https://github.com/eamodio/vscode-gitlens/issues/336) - Default Settings Get Added Automatically
- Fixes [#342](https://github.com/eamodio/vscode-gitlens/issues/342) - GitLens crashes while debugging with Chrome Debugger a larger project
- Fixes issue where username and/or password in a remote urls could be shown
## [8.2.1] - 2018-04-11

+ 3
- 1
src/annotations/blameAnnotationProvider.ts View File

@ -130,7 +130,9 @@ export abstract class BlameAnnotationProviderBase extends AnnotationProviderBase
if (commit === undefined) return undefined;
const hover = await Annotations.changesHover(commit, position.line, await GitUri.fromUri(document.uri));
return new Hover(hover.hoverMessage!, document.validateRange(new Range(position.line, 0, position.line, RangeEndOfLineIndex)));
if (hover.hoverMessage === undefined) return undefined;
return new Hover(hover.hoverMessage, document.validateRange(new Range(position.line, 0, position.line, RangeEndOfLineIndex)));
}
private async getCommitForHover(position: Position): Promise<GitCommit | undefined> {

+ 1
- 0
src/annotations/recentChangesAnnotationProvider.ts View File

@ -63,6 +63,7 @@ export class RecentChangesAnnotationProvider extends AnnotationProviderBase {
if (cfg.hovers.annotations.changes) {
message = Annotations.getHoverDiffMessage(commit, this._uri, line);
if (message === undefined) continue;
}
}

Loading…
Cancel
Save