-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add nil check for completion handlers #568
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
Conversation
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.
You can add "NS_ASSUME_NONNULL_BEGIN / END" to make sure that all other block params are not nullable.
Please add checks here as well:
e412303?diff=unified#diff-61c78c5fed9d99346ed86cc554a3c3afR2764
| completion(error); |
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.
Zsika, you haven't fixed this place:
| completion(error); |
|
|
||
|
|
||
| /*! @typedef textInputCompletionBlock | ||
| NS_ASSUME_NONNULL_BEGIN |
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.
Please add empty line
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.
added line break.
* Add nullability check for completion handler * Addresses comments * added line break
* Add nullability check for completion handler * Addresses comments * added line break
Adds nil check for completion handlers to avoid crashes.