Skip to content

[lit-html] Re-rendering an asyncReplace clears its value. #4408

@sorvell

Description

@sorvell

Which package(s) are affected?

Lit Core (lit / lit-html / lit-element / reactive-element)

Description

When a template using an asyncReplace is re-rendered without changing the iterable or its current value in the asyncReplace, the value is incorrectly cleared.

Reproduction

https://lit.dev/playground/#gist=257917d929b16bd6f3109c81f121b992

Click the requestUpdate button

Expected: the asyncReplace value should not change
Actual: the asyncReplace value is cleared (it is replaced if the iterable emits another value)

Workaround

None.

Is this a regression?

No or unsure. This never worked, or I haven't tried before.

Affected versions

3.x

Browser/OS/Node environment

All

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions