Files
payloadcms/test/fields/collections/Array
Patrik 3f5c989954 fix(ui): array field state to return empty array instead of 0 (#11283)
### What?

This PR fixes an issue where empty array fields would return `0` instead
of an empty array `[]` in form state.

The issue was caused by `rows` being initialized as `undefined` within
the array field reducer.

As a result, `rows` did not exist on array field state when initial
state was empty.

This has been updated to initialize as an empty array (`rows: []`) to
ensure consistent behavior when using `getDataByPath`.

Fixes #10712 


---
- To see the specific tasks where the Asana app for GitHub is being
used, see below:
  - https://app.asana.com/0/0/1211439284995184
2025-09-24 13:17:30 -04:00
..