Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
react-native | Fix a crash on deserilization of props when using 'px'…
…/'em' units. Summary: A huge set of props use YGValue directly, say something really basic like `margin`/`position`/`padding`/`border`. All of these according to CSS spec actually support `number | "em" | "px" | %` units, but we are going to throw and hard crash on `em` and `px`, which are unsupported in React Native. Using `tryTo` instead of `to` (noexcept vs throwing method) for conversion, and treating things like `margin: 50px` same way as we would treat `margin: false` which is not really supported. Changelog: [General][Fixed] - Fixed a crash on deserialization of props when using 'px'/'em' units. Reviewed By: bvanderhoof Differential Revision: D37163250 fbshipit-source-id: 59cbe65a821052f6c7e9588b6d4a0ac14e344684
- Loading branch information