Fix spurious logs about invalid MaxSizedBox children due to Ink6 + React19 migration (#2794)

This commit is contained in:
Jacob Richman 2025-07-01 11:54:27 -04:00 committed by GitHub
parent 01186e3aff
commit 2bf8e8b2c7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -278,7 +278,10 @@ function visitBoxRow(element: React.ReactNode): Row {
// Allow the key prop, which is automatically added by React.
maxExpectedProps += 1;
}
if (boxProps.flexDirection !== 'row') {
if (
boxProps.flexDirection !== undefined &&
boxProps.flexDirection !== 'row'
) {
debugReportError(
'MaxSizedBox children must have flexDirection="row".',
element,