fix breaking change in setMeasureFunc after emscripten migration #1219

Closed
jeetiss wants to merge 5 commits from fix-major-change into main
jeetiss commented 2023-01-26 06:35:42 -08:00 (Migrated from github.com)

current MeasureFunc is stricter than the previous one and when it returns only one dimension object yoga throw TypeError: Missing field: "height" or TypeError: Missing field: "width"

this is a breaking change and @react-pdf use this feature a lot, so i wanna return the previous behavior back

codesandbox with reproduction on yoga-layout-prebuilt: https://codesandbox.io/s/yoga-layout-measure-callback-wrong-data-1l9133

current `MeasureFunc` is stricter than the previous one and when it returns only one dimension object yoga throw `TypeError: Missing field: "height"` or `TypeError: Missing field: "width"` this is a breaking change and `@react-pdf` use this feature a lot, so i wanna return the previous behavior back codesandbox with reproduction on `yoga-layout-prebuilt`: https://codesandbox.io/s/yoga-layout-measure-callback-wrong-data-1l9133
facebook-github-bot commented 2023-01-26 09:08:29 -08:00 (Migrated from github.com)

@jacdebug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jacdebug has imported this pull request. If you are a Meta employee, you can view this diff [on Phabricator](https://www.internalfb.com/diff/D42778696).
facebook-github-bot commented 2023-01-26 16:24:35 -08:00 (Migrated from github.com)

@jacdebug merged this pull request in facebook/yoga@5496554cbf.

@jacdebug merged this pull request in facebook/yoga@5496554cbf450633066b7bfad6839dd9524018fe.

Pull request closed

Sign in to join this conversation.
No description provided.