Skip to content

fix: limit flattening depth#57

Merged
tdwesten merged 1 commit intotdwesten:mainfrom
kgirzadas:fix/field-parser-flatten
Apr 17, 2025
Merged

fix: limit flattening depth#57
tdwesten merged 1 commit intotdwesten:mainfrom
kgirzadas:fix/field-parser-flatten

Conversation

@kgirzadas
Copy link
Contributor

This PR addresses a side effect introduced by the fix in #52, which resolved issue #51 related to preserving the original order of fields when flattening mixed fieldsets and fields.

In the current implementation, flatten() method is used without a depth parameter, which unintentionally flattens too deeply. This causes issues during augmentation, especially when dealing with complex nested fields configurations.

What’s changed:

  • Updated the flatten() method to use a depth of 1, ensuring only the immediate level is flattened.
  • This preserves field order correctly while avoiding issues with over-flattened data structures.

@tdwesten
Copy link
Owner

tdwesten commented Apr 17, 2025

@kgirzadas thanks a lot for fixing this!

@tdwesten tdwesten merged commit 684eb02 into tdwesten:main Apr 17, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants