Skip to content

Commit

Permalink
fix(#4470): Resolve potential any in templates if first checked file …
Browse files Browse the repository at this point in the history
…was not root
  • Loading branch information
drodichkin committed Jul 3, 2024
1 parent 3194078 commit 9d69b5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/language-core/lib/languageModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ export function createVueLanguagePlugin<T>(
createVirtualCode(scriptId, languageId, snapshot) {
if (languageId === 'vue' || languageId === 'markdown' || languageId === 'html') {
const fileName = asFileName(scriptId);
if (!pluginContext.globalTypesHolder && getProjectVersion() !== canonicalRootFileNamesVersion) {
if (getProjectVersion() !== canonicalRootFileNamesVersion) {
canonicalRootFileNamesVersion = getProjectVersion();
if (isRootFile(fileName)) {
pluginContext.globalTypesHolder = fileName;
}
}
if (!pluginContext.globalTypesHolder && isRootFile(fileName)) {
pluginContext.globalTypesHolder = fileName;
}
const fileRegistry = getFileRegistry(pluginContext.globalTypesHolder === fileName);
const code = fileRegistry.get(fileName);
Expand Down

0 comments on commit 9d69b5f

Please sign in to comment.