Skip to content

Commit 5e4b64a

Browse files
committed
code: Cleaned
1 parent f4116ee commit 5e4b64a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/languageservice/services/gitlabciUtils.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ export function findNodeFromPath(
2020
for (const doc of docctx.documents) {
2121
if (isMap(doc.internalDocument.contents)) {
2222
let node: YAMLMap<unknown, unknown> = doc.internalDocument.contents;
23-
let i = 0;
2423
// Follow path
25-
while (i < path.length) {
24+
for (let i = 0; i < path.length; ++i) {
2625
const target = node.items.find(({ key: key }) => key == path[i]);
2726
if (target && i == path.length - 1) {
2827
return [uri, target, doctxt];
@@ -31,7 +30,6 @@ export function findNodeFromPath(
3130
} else {
3231
break;
3332
}
34-
++i;
3533
}
3634
}
3735
}

0 commit comments

Comments
 (0)