Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: int cast can cause endless loop if value < 1 (#38016)
Summary: I faced an issue that on Android the whole UI would freeze when using minimumFontScale. This is caused by an int cast that turns the while loop into an endless loop. Also the docs are not correct since they say it is an iOS only prop. https://reactnative.dev/docs/text#minimumfontscale-ios ## Changelog: [ANDROID] [FIXED] - UI freezing when using minimumFontScale Pull Request resolved: #38016 Test Plan: Run this sample app with and without this fix. https://github.com/g4rb4g3/androidMinimumFontScaleBug Without the ui will freeze when hitting the + button, with the fix a Text component will be shown and no freeze will happen. 🙂 Reviewed By: cipolleschi Differential Revision: D46931439 Pulled By: NickGerleman fbshipit-source-id: 6985443b3424539b40bc0081fe742ab59105a2ae
- Loading branch information