When only one child ({ }) is passed to children prop it can be either { } or [{ }] depending on how it was passed.
This is done for performance and consistent type reasons between rerenders. Changing the length check to isArray check to include this edge case.
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Description
When only one child (
{ }
) is passed tochildren
prop it can be either{ }
or[{ }]
depending on how it was passed. This is done for performance and consistent type reasons between rerenders. Changing the length check to isArray check to include this edge case.Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: