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

Error when array rest property is array or object when destructuring objects in the markup #8554

Closed
ngtr6788 opened this issue May 3, 2023 · 1 comment · Fixed by #8555
Closed

Comments

@ngtr6788
Copy link
Contributor

ngtr6788 commented May 3, 2023

Describe the bug

Related but not too related: #8552

Per MDN docs, "[t]he rest property of array destructuring assignment can be another array or object binding pattern", for example,

const [a, b, ...[c, d]] = [1, 2, 3, 4];
const [e, f, ...{ length }] = [5, 6, 7, 8];

However, I tried doing that in await blocks/each blocks/const tags (ie, in the markup), there is an error (check the REPL) saying 'third' is not defined (6:24), which it clearly does.

Reproduction

https://svelte.dev/repl/2fe0f17e05e7414db205b1366bc8ca68?version=3.58.0

Logs

N/A

System Info

N/A

Severity

annoyance

dummdidumm added a commit that referenced this issue May 4, 2023
Fixes #8554

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
@Conduitry
Copy link
Member

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 a pull request may close this issue.

2 participants