Skip to content

Commit cb7e972

Browse files
committed
chore: fix lint findings
1 parent fd43191 commit cb7e972

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/iterate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export default function* iterate(
4343
if (typeof obj === 'object' && obj !== null && !NOT_ITERABLE.some((cls) => obj instanceof cls)) {
4444
// Handle plain arrays directly if we're at the target field and not using a wildcard
4545
if (Array.isArray(obj) && currentPath.length === splittedFields.length && !isTrailingWildcard && field) {
46-
for (let i = 0; i < obj.length; i++) {
47-
yield [[...currentPath, i].join('.'), obj[i]];
46+
for (const [i, element] of obj.entries()) {
47+
yield [[...currentPath, i].join('.'), element];
4848
}
4949
return;
5050
}

0 commit comments

Comments
 (0)