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(themes): reverse order of themes checked when shadowing #11954

Merged
merged 1 commit into from
Feb 21, 2019

Conversation

ChristopherBiscardi
Copy link
Contributor

Description

Component shadowing with a total number of potential shadowings >= 2 (excluding the theme with the component and the site itself, which are absolutely positioned in the order relative to other potential shadow paths) exhibit a bug due to the ordering in which potential theme paths are checked. The order should be reversed. This PR copies the themes array (not strictly necessary, but we shouldn't depend on the assumption that we can safely mutate) then reverses it.

Related Issues

Fixes #11951

@wardpeet
Copy link
Contributor

I'm unsure if we're already at that state but would be cool if we had some unit tests or integration tests for these functionalities.

Copy link
Contributor

@jlengstorf jlengstorf left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for the quick fix!

@DSchau
Copy link
Contributor

DSchau commented Feb 21, 2019

Looks good to me!

@wardpeet it's on @ChristopherBiscardi's radar! Should be coming soon!

@DSchau DSchau merged commit 8284793 into gatsbyjs:master Feb 21, 2019
@DSchau
Copy link
Contributor

DSchau commented Feb 21, 2019

Successfully published:
 - gatsby@2.1.14

@ChristopherBiscardi
Copy link
Contributor Author

@wardpeet yep, tests are on my radar. some e2e ones should show up soon to start

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.

5 participants