We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd43191 commit cb7e972Copy full SHA for cb7e972
src/utils/iterate.ts
@@ -43,8 +43,8 @@ export default function* iterate(
43
if (typeof obj === 'object' && obj !== null && !NOT_ITERABLE.some((cls) => obj instanceof cls)) {
44
// Handle plain arrays directly if we're at the target field and not using a wildcard
45
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]];
+ for (const [i, element] of obj.entries()) {
+ yield [[...currentPath, i].join('.'), element];
48
}
49
return;
50
0 commit comments