File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,8 @@ namespace ts.server {
149149 */
150150 private projectStateVersion = 0 ;
151151
152+ protected isInitialLoadPending : ( ) => boolean = returnFalse ;
153+
152154 /*@internal */
153155 dirty = false ;
154156
@@ -1022,7 +1024,10 @@ namespace ts.server {
10221024
10231025 /* @internal */
10241026 getChangesSinceVersion ( lastKnownVersion ?: number ) : ProjectFilesWithTSDiagnostics {
1025- this . updateGraph ( ) ;
1027+ // Update the graph only if initial configured project load is not pending
1028+ if ( ! this . isInitialLoadPending ( ) ) {
1029+ this . updateGraph ( ) ;
1030+ }
10261031
10271032 const info : protocol . ProjectVersionInfo = {
10281033 projectName : this . getProjectName ( ) ,
@@ -1309,6 +1314,8 @@ namespace ts.server {
13091314 /*@internal */
13101315 projectOptions ?: ProjectOptions | true ;
13111316
1317+ protected isInitialLoadPending : ( ) => boolean = returnTrue ;
1318+
13121319 /*@internal */
13131320 constructor ( configFileName : NormalizedPath ,
13141321 projectService : ProjectService ,
@@ -1332,6 +1339,7 @@ namespace ts.server {
13321339 * @returns : true if set of files in the project stays the same and false - otherwise.
13331340 */
13341341 updateGraph ( ) : boolean {
1342+ this . isInitialLoadPending = returnFalse ;
13351343 const reloadLevel = this . pendingReload ;
13361344 this . pendingReload = ConfigFileProgramReloadLevel . None ;
13371345 let result : boolean ;
You can’t perform that action at this time.
0 commit comments