From 539e3a061d1b71887d7fe388db87c7a8288060f0 Mon Sep 17 00:00:00 2001 From: Vitaly Date: Sun, 4 Feb 2024 19:44:39 +0300 Subject: [PATCH] fix potential no-setting perf regression --- typescript/src/completions/filesAutoImport.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/typescript/src/completions/filesAutoImport.ts b/typescript/src/completions/filesAutoImport.ts index a171aba..13b9d06 100644 --- a/typescript/src/completions/filesAutoImport.ts +++ b/typescript/src/completions/filesAutoImport.ts @@ -13,9 +13,8 @@ export default () => { for (const [ext, item] of Object.entries(filesAutoImport)) { if (currentText.startsWith(item.prefix)) included.push({ ext, item }) } - // if (!included.length) return + if (included.length === 0) return const root = languageServiceHost.getCurrentDirectory() - // const fileRelative = nodeModules.path.relative(root, sourceFile.fileName) const collected = [] as string[] const MAX_ITERATIONS = 200 let iter = 0