Skip to content

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

@TehShrike

Description

@TehShrike

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions