mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Second pass converting for index based looping to for-of loops
More manual conversion of index based for loops to for-of loops
This commit is contained in:
@@ -195,9 +195,9 @@ function escapePath(p: string) {
|
||||
}
|
||||
|
||||
function resolveWorkspaceRoot(activeDoc: TextDocument, workspaceFolders: WorkspaceFolder[]): string | undefined {
|
||||
for (let i = 0; i < workspaceFolders.length; i++) {
|
||||
if (startsWith(activeDoc.uri, workspaceFolders[i].uri)) {
|
||||
return path.resolve(URI.parse(workspaceFolders[i].uri).fsPath);
|
||||
for (const folder of workspaceFolders) {
|
||||
if (startsWith(activeDoc.uri, folder.uri)) {
|
||||
return path.resolve(URI.parse(folder.uri).fsPath);
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
|
||||
Reference in New Issue
Block a user