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
Store variable name containing number throws undefined error #7120
Closed
Comments
You are using TS after all 😄 . What's the TS output? Does it repro with JS? This might not be an issue with Svelte directly but with your TS setup. |
If it's not reproducible without TS then it might be a |
4 tasks
only replicable when adding |
dummdidumm
pushed a commit
to sveltejs/svelte-preprocess
that referenced
this issue
Jan 12, 2022
Fixes sveltejs/svelte#7120 the original regex had +-=, which forgot to escape -, resulting ignoring any characters between + to =
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
I had some stores that were named
web3
,web3Auth
, etc. When importing and using them, the usage will throw an error that the variable is not defined.Renaming the variables to something else that doesn't contain a number will solve the issue.
Minor issue but this naming is not a problem with pure JS, so something seems to be going wrong here with Svelte.
Reproduction
Create a file
num0.ts
with this content:Create a component with this content:
Logs
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: