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

Ignore empty non-mapped aesthetics #6011

Merged
merged 4 commits into from
Aug 26, 2024

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #6009.

Briefly, when passing NULL or 0-length aesthetics in layer() it will raise a warning. Previously, this would raise an error.
As far as I know, there isn't any situation in which it is desirable to pass a 0-length aesthetic. Even if the data has 0-rows, nothing should be shown and no information is to be derived from a 0-length aesthetic. Note that this PR only applies to aesthetics passed outside the aes() function.

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

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

LGTM

@teunbrand teunbrand merged commit e69687a into tidyverse:main Aug 26, 2024
13 checks passed
@teunbrand teunbrand deleted the ignore_empty_aes branch August 26, 2024 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression related to #5807
2 participants