mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
Don't make extra findFiles call on TS 3.0
WIth TS 3.0, we don't need to pass a js or ts file for the project
This commit is contained in:
@@ -209,7 +209,12 @@ export class UpdateImportsOnFileRenameHandler {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
if (this.client.apiVersion.gte(API.v292) && fs.lstatSync(resource.fsPath).isDirectory()) {
|
||||
const isDirectory = fs.lstatSync(resource.fsPath).isDirectory();
|
||||
if (isDirectory && this.client.apiVersion.gte(API.v300)) {
|
||||
return resource;
|
||||
}
|
||||
|
||||
if (isDirectory && this.client.apiVersion.gte(API.v292)) {
|
||||
const files = await vscode.workspace.findFiles({
|
||||
base: resource.fsPath,
|
||||
pattern: '**/*.{ts,tsx,js,jsx}',
|
||||
|
||||
Reference in New Issue
Block a user