Skip to content

Commit

Permalink
fix(vscode): handle typescript-language-features module load race c…
Browse files Browse the repository at this point in the history
…ondition
  • Loading branch information
johnsoncodehk committed Mar 7, 2025
1 parent 61fc3ca commit adf44df
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions extensions/vscode/src/nodeClientMain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,11 @@ try {
// @ts-expect-error
return readFileSync(...args);
};

const loadedModule = require.cache[extensionJsPath];
if (loadedModule) {
delete require.cache[extensionJsPath];
const patchedModule = require(extensionJsPath);
Object.assign(loadedModule.exports, patchedModule);
}
} catch { }

0 comments on commit adf44df

Please sign in to comment.