From 2bd191793013059f74a489b60d6d20ff533cb71f Mon Sep 17 00:00:00 2001 From: Johnson Chu Date: Tue, 12 Dec 2023 22:36:41 +0800 Subject: [PATCH] fix(language-core): `resolveSourceFileName` condition incorrect --- packages/language-core/src/languageModule.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/language-core/src/languageModule.ts b/packages/language-core/src/languageModule.ts index 79aec83a9b..06ccc5f33f 100644 --- a/packages/language-core/src/languageModule.ts +++ b/packages/language-core/src/languageModule.ts @@ -86,7 +86,7 @@ export function createVueLanguage( typescript: { resolveSourceFileName(tsFileName) { const baseName = path.basename(tsFileName); - if (baseName.indexOf('.vue.')) { // .vue.ts .vue.d.ts .vue.js .vue.jsx .vue.tsx + if (baseName.indexOf('.vue.') >= 0) { // .vue.ts .vue.d.ts .vue.js .vue.jsx .vue.tsx return tsFileName.substring(0, tsFileName.lastIndexOf('.vue.') + '.vue'.length); } },