You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
The pattern export let myFunc = getContext('myFunc') || (v) => v; should not cause any kind of error.
Stacktraces
If you have a stack trace to include, we recommend putting inside a <details> block for the sake of the thread's readability:
Stack trace
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
13: export let tickFormatter = getContext('tickFormatter') || ((v) => v);
Information about your Svelte project:
Your browser and the version: Firefox 73.0b9 (64-bit)
Your operating system: OS X 10.14
Svelte version 3.18.1
Whether your project uses Webpack or Rollup
Severity
This is not blocking my team at the moment, since we have a workaround by using function myFunction(v) { return v }; in place of the arrow function but I could see this throwing others off and eroding trust in Svelte.
The text was updated successfully, but these errors were encountered:
Describe the bug
I am updating a large Svelte codebase from 3.12.1 to 3.18.1, and received a parsing error for the following line that previously worked fine:
If I replace the arrow function with something like
function myFunction(v) { return v}
the error goes away.To Reproduce
https://svelte.dev/repl/60c49c4243014a69acfc47b79437ae7e?version=3.18.1 reproduces the issue minimally.
Expected behavior
The pattern
export let myFunc = getContext('myFunc') || (v) => v;
should not cause any kind of error.Stacktraces
If you have a stack trace to include, we recommend putting inside a
<details>
block for the sake of the thread's readability:Stack trace
Information about your Svelte project:
Your browser and the version: Firefox 73.0b9 (64-bit)
Your operating system: OS X 10.14
Svelte version 3.18.1
Whether your project uses Webpack or Rollup
Severity
This is not blocking my team at the moment, since we have a workaround by using
function myFunction(v) { return v };
in place of the arrow function but I could see this throwing others off and eroding trust in Svelte.The text was updated successfully, but these errors were encountered: