Skip to content
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

Hotfix for publishing pages #9161

Merged
merged 1 commit into from
Aug 20, 2018
Merged

Hotfix for publishing pages #9161

merged 1 commit into from
Aug 20, 2018

Conversation

oandregal
Copy link
Member

Additional fix for #9054

@oandregal oandregal self-assigned this Aug 20, 2018
@oandregal oandregal added the [Type] Bug An existing feature does not function as intended label Aug 20, 2018
Copy link
Member

@tofumatt tofumatt left a comment

Choose a reason for hiding this comment

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

Troubling that our new page-publishing test didn't catch this one, that's worth looking into 😢

@oandregal
Copy link
Member Author

Yeah :( I'll do that today. Need to dig into how taxonomies are retrieved and modify that test case.

@oandregal oandregal merged commit ec1fd21 into master Aug 20, 2018
@oandregal oandregal deleted the fix/maybe-tags-panel branch August 20, 2018 12:58
@oandregal oandregal removed the request for review from youknowriad August 20, 2018 12:58
@@ -60,7 +60,7 @@ export default compose(
withSelect( ( select ) => {
const postType = select( 'core/editor' ).getCurrentPostType();
const tagsTaxonomy = select( 'core' ).getTaxonomy( 'post_tag' );
const tags = select( 'core/editor' ).getEditedPostAttribute( tagsTaxonomy.rest_base );
const tags = tagsTaxonomy && select( 'core/editor' ).getEditedPostAttribute( tagsTaxonomy.rest_base );
return {
areTagsFetched: tagsTaxonomy !== undefined,
isPostTypeSupported: tagsTaxonomy && tagsTaxonomy.types.some( ( type ) => type === postType ),
Copy link
Member

Choose a reason for hiding this comment

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

FWIW on the line below this one we're passing hasTags, which reads as though it's a boolean value, but following the && and its behavior of using the lefthand value, we're likely passing null or undefined when there are no tags, not false.

Making a point of it here only because this tends to be overlooked in applying the && pattern for conditions, added here.

@danielbachhuber
Copy link
Member

@nosolosw Can we make sure merged pull requests are assigned to milestones, please?

@tofumatt tofumatt added this to the 3.7 milestone Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants