-
Notifications
You must be signed in to change notification settings - Fork 24.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent a crash when no cursor drawable is set #14789
Conversation
Why should not 'catch' (try-catch) this exception as we catch others at the end of the function? |
@shergin It's not really an exception. It's a valid state for it to be 0 so it would be counter intuitive to let it throw. |
@shergin For the record, the exception that would be thrown is NotFoundException |
@gpeal I tried to find reviewers for this pull request and wanted to ping them to take another look. However, based on the blame information for the files in this pull request I couldn't find any reviewers. This sometimes happens when the files in the pull request are new or don't exist on master anymore. Is this pull request still relevant? If yes could you please rebase? In case you know who has context on this code feel free to mention them in a comment (one person is fine). Thanks for reading and hope you will continue contributing to the project. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
@shergin bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shergin is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: React Native 0.43 added additional functionality to setSelectionColor that also tints the cursor drawable of the View. However, some views may not have a cursor drawable set in which case, the code will crash when attempting to load a drawable with resource id 0. We encountered this in our RN 0.45 upgrade in the Airbnb app. lelandrichardson Closes facebook#14789 Differential Revision: D6386076 Pulled By: shergin fbshipit-source-id: faa5a1edb3be8d08988f46205c0f22d17b63b5bc
Summary: React Native 0.43 added additional functionality to setSelectionColor that also tints the cursor drawable of the View. However, some views may not have a cursor drawable set in which case, the code will crash when attempting to load a drawable with resource id 0. We encountered this in our RN 0.45 upgrade in the Airbnb app. lelandrichardson Closes facebook#14789 Differential Revision: D6386076 Pulled By: shergin fbshipit-source-id: faa5a1edb3be8d08988f46205c0f22d17b63b5bc
Summary
React Native 0.43 added additional functionality to setSelectionColor that also tints the cursor drawable of the View. However, some views may not have a cursor drawable set in which case, the code will crash when attempting to load a drawable with resource id 0.
We encountered this in our RN 0.45 upgrade in the Airbnb app.
@lelandrichardson