Skip to content
This repository was archived by the owner on Jun 19, 2025. It is now read-only.

Conversation

@ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Aug 8, 2018

Ref #wordpress-mobile/WordPress-iOS#9940

Since the Post Editor in WPiOS sometimes return nil for emptyViewController, it was crashing when attempting to add it to the view. This adds a test to ensure it actually exists before doing so.

To test:

@ScoutHarris
Copy link
Contributor Author

Hey @frosty . Would you mind doing this one with wordpress-mobile/WordPress-iOS#9943 since they go together? Thank you!!

Copy link
Contributor

@frosty frosty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one comment, but happy to merge after that!

- (void)addEmptyViewControllerToView
{
if (self.emptyViewController.view.superview == nil) {
if (self.emptyViewController && _emptyViewController.view.superview == nil) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method switches between self.emptyViewController and _emptyViewController a few times – could we make them all the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do. Thanks @frosty !

@ScoutHarris ScoutHarris merged commit f5eb8a4 into develop Aug 9, 2018
@ScoutHarris ScoutHarris deleted the issue/9504-handle_nil_no_results_view_controller branch August 9, 2018 16:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants