mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
Replace some common index based for loops with for-of loops
Replaces many loops of the form:
```js
for (let i = 0; i < elements.length; ++i) {
const i = elements[i];
...
}
```
with:
```js
for (const element of elements) {
...
}
```
Mix of a horrible regex based find/replace and manual touch ups
This commit is contained in:
@@ -29,9 +29,9 @@ function updateCSSNode(editor: TextEditor, property: Property): Thenable<boolean
|
||||
let currentPrefix = '';
|
||||
|
||||
// Find vendor prefix of given property node
|
||||
for (let i = 0; i < vendorPrefixes.length; i++) {
|
||||
if (property.name.startsWith(vendorPrefixes[i])) {
|
||||
currentPrefix = vendorPrefixes[i];
|
||||
for (const prefix of vendorPrefixes) {
|
||||
if (property.name.startsWith(prefix)) {
|
||||
currentPrefix = prefix;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user