Skip to content

null is being removed when used as value in dangerouslySetInnerHTML html #346

Closed
@lfre

Description

@lfre

Printing out null as the contents of an HTML text node through dangerouslySetInnerHTML activates the async renderer #333, and is removed from the output.

It used to be undefined but switched to null after this PR #339

E.g:

  1. Correctly prints as text
<p dangerouslySetInnerHTML={{ __html: undefined }} />
  1. Activates async renderer indirectly and is removed from the output.
<p dangerouslySetInnerHTML={{ __html: null }} />

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