Skip to content

Fix baseline layout NaN asent value returned by calculateBaseline#1933

Open
hzxiaosheng wants to merge 2 commits into
facebook:mainfrom
hzxiaosheng:main
Open

Fix baseline layout NaN asent value returned by calculateBaseline#1933
hzxiaosheng wants to merge 2 commits into
facebook:mainfrom
hzxiaosheng:main

Conversation

@hzxiaosheng
Copy link
Copy Markdown

this MR fix #1932 calculateBaseline(node) may return NaN if the baselineChild has not been measured.

A NaN value returned from calculateBaseline(node) disrupts Yoga's layout engine, leading to incorrect ascent, descent, and line height calculations. This issue is critical when a parent node uses alignItems: 'baseline', causing improper vertical alignment and height calculation.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
yoga-website Ready Ready Preview, Comment Apr 19, 2026 6:31am

Request Review

@meta-cla meta-cla Bot added the CLA Signed label Apr 16, 2026
@hzxiaosheng hzxiaosheng changed the title Fix baseline layout NaN asent value returned by calculateBaseline #1932 Fix baseline layout NaN asent value returned by calculateBaseline Apr 16, 2026
@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

calculateBaseline(node) may return NaN if the baselineChild has not been measured

1 participant