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

Dev mode {#each} check breaks with strings #4450

Closed
Conduitry opened this issue Feb 23, 2020 · 1 comment · Fixed by #4451
Closed

Dev mode {#each} check breaks with strings #4450

Conduitry opened this issue Feb 23, 2020 · 1 comment · Fixed by #4451
Labels

Comments

@Conduitry
Copy link
Member

Describe the bug
The dev mode validation check for {#each} blocks breaks with strings.

Logs
cannot use 'in' operator to search for "length" in "foo"

To Reproduce
https://svelte.dev/repl/svg-transitions?version=3.19.0

Expected behavior
Same as https://svelte.dev/repl/svg-transitions?version=3.18.2

Stacktraces

Information about your Svelte project:

  • Browser independent
  • Reproducible in REPL

Severity
Moderate, probably.

Additional context
The check introduced in #4419 apparently throws with strings. We probably want to consider strings to be array-like objects, and so we need to be more permissive with the validation check.

@Conduitry
Copy link
Member Author

The example works again in 3.19.1 - https://svelte.dev/repl/svg-transitions?version=3.19.1 - and will be fixed on https://svelte.dev/examples#svg-transitions as well once unpkg's latest tag caching expires.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant