Skip to content

Mithril throws an error when two or more sibling components render content via m.trust #2498

@spacejack

Description

@spacejack

When 2 or more instances of a component that renders m.trust() content are rendered, changing the html string passed to m.trust between redraws will cause Mithril to throw an error.

Mithril version: 2.0.3

Browser and OS: All

Code

flems example

Steps to Reproduce

  1. In the flems example above, click one 'Toggle' button
  2. Then click the other toggle button.

Expected Behavior

Mithril should render the content.

Current Behavior

Throws the error: Cannot read property 'length' of undefined

Metadata

Metadata

Assignees

Labels

Area: CoreFor anything dealing with Mithril core itselfType: BugFor bugs and any other unexpected breakage

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions