Skip to content

willDestroyElement not firing in {{each}} else #12716

@amk221

Description

@amk221
A.                            |     B.
{{#each items as |item|}}     |     {{#each items as |item|}}
  {{!...}}                    |        {{!...}}
{{else}}                      |     {{/each}}
  {{my-component}}            |     {{#unless items.length}}
{{/each}}                     |       {{my-component}}
                              |     {{/unless}}

In example A. the willDestroyElement hook is not firing for {{my-component}} when it is torn down.
It works for example B.
jsfiddle

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions