Skip to content

Commit

Permalink
don't need to check during initial load
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonlyu123 committed Sep 26, 2024
1 parent 45b627c commit e63ceb0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion packages/language-server/src/plugins/typescript/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -651,11 +651,20 @@ async function createLanguageService(
function ensureProjectFileUpdates(newFile?: string): void {
const info = parsedTsConfigInfo.get(tsconfigPath);
if (!info) {
console.log('No tsconfig info found for', tsconfigPath);
return;
}
if (newFile && !docContext.globalSnapshotsManager.get(newFile)) {

if (
newFile &&
!info.pendingProjectFileUpdate &&
// no global snapshots yet when initial load pending
!snapshotManager.isProjectFile(newFile) &&
!docContext.globalSnapshotsManager.get(newFile)
) {
scheduleProjectFileUpdate([newFile]);
}

if (!info.pendingProjectFileUpdate) {
return;
}
Expand Down

0 comments on commit e63ceb0

Please sign in to comment.