mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: We observed that in certain production scenarios, `[UIFont fontNamesForFamilyName:familyName]` returns `nil`. This is problematic because we cannot insert `nil` (which is not an object type) into `NSCache`. Currently, this is causing `NSInvalidArgumentException` to be thrown. This fix works around the problem by guarding against `nil`. Changelog: [iOS][Fixed] - Fix NSInvalidArgumentException for invalid font family names. Reviewed By: fkgozali Differential Revision: D31011394 fbshipit-source-id: a9eb9ce69efd832acca65787c665fcbb7b42a795