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: const to let in "the <form> element" #546

Merged
merged 2 commits into from
Dec 20, 2023
Merged

Conversation

golfomania
Copy link
Contributor

Lesson
The Form Element

Problem
In the load function in +page.server.js a new userid is created if not found in cookies
But id is declared as const so it can not be updated
Tutorial app run into 500 internal error

How to reproduce
e.g. open link in incognito window

Fix
change declaration from id from const to let

Martin
This is my first open source contribution, so i hope this PR works for you this way

Copy link

vercel bot commented Dec 17, 2023

@golfomania is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

@golfomania
Copy link
Contributor Author

found more sections with the same code and changed it as well in second commit

@golfomania
Copy link
Contributor Author

related to #543

@JonathanHarford
Copy link

I was just now working through the tutorial and bumped up against that problem. Thanks!

@golfomania
Copy link
Contributor Author

@JonathanHarford as long as the PR is not accepted just fix it manually in the file 👍

@taylorgorman
Copy link

Came here to fix this, happy to see you beat me to it!

Copy link
Member

@geoffrich geoffrich left a comment

Choose a reason for hiding this comment

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

Thanks!

@geoffrich geoffrich merged commit c8fa635 into sveltejs:main Dec 20, 2023
1 check failed
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.

4 participants