Skip to content

Commit d69a18d

Browse files
RyanCavanaughbillti
authored andcommitted
Store the size of the project properly
(cherry picked from commit 16c7bcf) (cherry picked from commit 8b3c54d)
1 parent afbe63a commit d69a18d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/server/editorServices.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -873,14 +873,14 @@ namespace ts.server {
873873
continue;
874874
}
875875
totalNonTsFileSize += this.host.getFileSize(fileName);
876-
if (totalNonTsFileSize > availableSpace) {
876+
if (totalNonTsFileSize > maxProgramSizeForNonTsFiles) {
877877
this.projectToSizeMap[name] = totalNonTsFileSize;
878878
return true;
879879
}
880880
}
881881

882882
this.projectToSizeMap[name] = totalNonTsFileSize;
883-
return false;
883+
return totalNonTsFileSize < availableSpace;
884884
}
885885

886886
private createAndAddExternalProject(projectFileName: string, files: protocol.ExternalFile[], options: protocol.ExternalProjectCompilerOptions, typeAcquisition: TypeAcquisition) {

0 commit comments

Comments
 (0)