Fixes regression with code lens

This commit is contained in:
Eric Amodio
2017-06-12 10:33:05 -04:00
parent c1c65127b7
commit 5624567daa
2 changed files with 3 additions and 3 deletions

View File

@@ -73,7 +73,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
let blame: GitBlame | undefined;
if (languageLocations.locations.length === 1 && languageLocations.locations.includes(CodeLensLocations.Document)) {
blame = await blamePromise;
if (blame === undefined || !blame.lines.length) return lenses;
if (blame === undefined || blame.lines.length === 0) return lenses;
}
else {
const values = await Promise.all([
@@ -82,7 +82,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
]);
blame = values[0] as GitBlame;
if (blame === undefined || !blame.lines.length) return lenses;
if (blame === undefined || blame.lines.length === 0) return lenses;
const symbols = values[1] as SymbolInformation[];
Logger.log('GitCodeLensProvider.provideCodeLenses:', `${symbols.length} symbol(s) found`);