Skip to content

Commit

Permalink
PR feedback and clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul van Brenk committed Sep 13, 2016
1 parent 17dbaf0 commit 84caec3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/services/services.ts
Expand Up @@ -1347,10 +1347,8 @@ namespace ts {
function getNavigateToItems(searchValue: string, maxResultCount?: number, fileName?: string): NavigateToItem[] {
synchronizeHostData();

const sourceFiles = !fileName ? program.getSourceFiles() : [program.getSourceFile(fileName)];

const checker = getProgram().getTypeChecker();
return ts.NavigateTo.getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount);
const sourceFiles = fileName ? [getValidSourceFile(fileName)] : program.getSourceFiles();
return ts.NavigateTo.getNavigateToItems(sourceFiles, program.getTypeChecker(), cancellationToken, searchValue, maxResultCount);
}

function getEmitOutput(fileName: string): EmitOutput {
Expand Down

0 comments on commit 84caec3

Please sign in to comment.