-
Notifications
You must be signed in to change notification settings - Fork 219
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
don't show featured products section if none exist (on not-found template) #852
Conversation
If featured products do not exist, not-found template still shows the <section> and the h3 headline. this commit fixes that with a length check / fallback of return null.
🦋 Changeset detectedLatest commit: 68684a5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@electricenjindevops is attempting to deploy a commit to the BigCommerce Platform Team on Vercel. A member of the Team first needs to authorize it. |
|
Thanks for your contribution @electricenjindevops, I'll ask the team to review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for the contribution!
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Lint task is not going to work as it's being ran on a fork. We don't share our secrets with forked branches. Confirmed it worked locally though. |
What/Why?
The not found template doesn't account for stores that do not have any featured products, which is a dev error.
If featured products do not exist, not-found template still shows the section and the h3 headline. this commit fixes that with a length check / fallback of return null.
The git file changes may show a big block replacement, but the only changes are the if statement above the section open and else condition below the section close.
Testing
I tested by running two different Catalyst stores in dev & build, one on a store with no featured products, and one with featured products. I also had tested using a single store with featured products toggled on/off too.