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

Fix bug in fallback of grid::linearGradient() #6146

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

teunbrand
Copy link
Collaborator

This PR does not fix an active issue. Instead it fixes a bug that should have been an issue, but isn't.

Briefly, when linearGradient is found in {grid}'s namespace, we want to declare that the linearGradient() function that ggplot2 uses is the one from {grid} and not the one we define here:

ggplot2/R/backports.R

Lines 55 to 56 in ddd207e

# Unavailable prior to R 4.1.0
linearGradient <- version_unavailable

However, we're assigning the result of linearGradient(), not the function itself. This PR rectifies this mistake.
This doesn't really affect anybody as when we use linearGradient() as a function, the {grid} version is used anyway because ggplot2::linearGradient is not a 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 fe26414 into tidyverse:main Oct 28, 2024
13 checks passed
@teunbrand teunbrand deleted the fix_backport_bug branch October 28, 2024 14:49
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.

2 participants