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 undefined menu error #1533

Merged
merged 1 commit into from
Dec 5, 2023
Merged

🐛 fix undefined menu error #1533

merged 1 commit into from
Dec 5, 2023

Conversation

michenly
Copy link
Contributor

@michenly michenly commented Dec 1, 2023

WHY are these changes introduced?

🐛 Fix menu undefined error found during default creation flow.

WHAT is this pull request doing?

fix by putting a bunch of safe guard checking if those variables value exist

HOW to test your changes?

Recreate this bug by using npm create @shopify/hydrogen@latest and select no route template.
run npm run dev & load the site in browser to see the following error.
image14

Do the same to current set to see the error disappear

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

@juanpprieto juanpprieto left a comment

Choose a reason for hiding this comment

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

Thanks @michenly

Curious, did this error happen when linking the new project was linked to Mock.shop? and/or your personal shop?

Can you create a path changeset for cli-hydrogen and hydrogen-create? This will ensure that the CLI is able to scaffold new skeleton projects with these changes

@michenly michenly merged commit d53b4ed into main Dec 5, 2023
8 checks passed
@michenly michenly deleted the fix-menu-error branch December 5, 2023 21:55
juanpprieto pushed a commit that referenced this pull request Dec 7, 2023
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.

None yet

2 participants