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 sticky header JS error #490

Merged
merged 1 commit into from
Aug 26, 2021
Merged

Fix sticky header JS error #490

merged 1 commit into from
Aug 26, 2021

Conversation

tauthomas01
Copy link
Contributor

@tauthomas01 tauthomas01 commented Aug 25, 2021

Why are these changes introduced?

The goal of this PR is to fix a JS error when sticky header is not enabled while switching to different variant pointing to a different image on product page. The criteria are:

  • Have multiple variants
  • Have different variant pointing to different image
  • Header sticky setting is disabled

image

What approach did you take?

  • Add JS condition to prevent errors

Demo links

Checklist

@ludoboludo ludoboludo self-requested a review August 25, 2021 20:01
Copy link
Contributor

@ludoboludo ludoboludo left a comment

Choose a reason for hiding this comment

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

Looks good!

I didn't even realize when introducing the code causing the issue that we had a setting to enable/disable sticky header 😬

Copy link
Contributor

@sofiamatulis sofiamatulis left a comment

Choose a reason for hiding this comment

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

Nice! 🎉

@sofiamatulis sofiamatulis self-assigned this Aug 26, 2021
@tauthomas01 tauthomas01 merged commit 6e4d4bc into main Aug 26, 2021
@tauthomas01 tauthomas01 deleted the fix-sticky-header-js-error branch August 26, 2021 18:42
phapsidesGT pushed a commit to Gravytrain-UK/gt-shopify-dawn-theme that referenced this pull request Sep 3, 2024
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.

3 participants