Skip to content

Commit

Permalink
fix(typescript): cannot update source scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Jun 22, 2024
1 parent ecf0af2 commit 22af0fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/typescript/lib/plugins/semantic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ export function create(
function updateSourceScriptFileNames() {
sourceScriptNames.clear();
for (const fileName of languageServiceHost.getScriptFileNames()) {
const uri = ctx.fileNameToUri(fileName);
const maybeEmbeddedUri = ctx.fileNameToUri(fileName);
const decoded = context.decodeEmbeddedDocumentUri(maybeEmbeddedUri);
const uri = decoded ? decoded[0] : maybeEmbeddedUri;
const sourceScript = context.language.scripts.get(uri);
if (sourceScript?.generated) {
const tsCode = sourceScript.generated.languagePlugin.typescript?.getServiceScript(sourceScript.generated.root);
Expand Down

0 comments on commit 22af0fd

Please sign in to comment.