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

{{yield}} behaves incorrectly inside of {{#each}} loops #230

Closed
TehShrike opened this issue Dec 28, 2016 · 1 comment · Fixed by #243
Closed

{{yield}} behaves incorrectly inside of {{#each}} loops #230

TehShrike opened this issue Dec 28, 2016 · 1 comment · Fixed by #243

Comments

@TehShrike
Copy link
Member

TehShrike commented Dec 28, 2016

In this example, the value of person is inherited correctly from the enclosing component:

<div>
  <SomeYieldingComponent>
    Hello {{person}}
  </SomeYieldingComponent>
</div>

In this example, it is not:

<div>
  {{#each people as person}}
     <SomeYieldingComponent>
      Hello {{person}}
    </SomeYieldingComponent>
  {{/each}
</div>

As far as I know {{yield}} is not usable in the online repl, so here is a full reproduction: https://github.com/TehShrike/svelte-yield-issue-repro

Rich-Harris added a commit that referenced this issue Jan 4, 2017
Rich-Harris added a commit that referenced this issue Jan 4, 2017
fix component yields inside each blocks
@Rich-Harris
Copy link
Member

Fixed in 1.6.3, thanks

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