Skip to content

[solid-js/html] <Show> in html template renders function source code to DOM #2033

@trusktr

Description

@trusktr

Describe the bug

A template with <Show>, f.e.

html`
	<${Show} when=${() => true}>
		<p>asd</p>
	</${Show}>
`

renders the following DOM (the below is what you see on the screen):

function () { [native code] },>

Your Example Website or App

https://playground.solidjs.com/anonymous/b46ba5d0-593a-4762-9eb1-91b4e1903e58

Steps to Reproduce the Bug or Issue

  1. See playground
  2. see visual output

Expected behavior

It should handle the Show component

Screenshots or Videos

Screenshot 2024-01-14 at 11 41 18 AM

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

No response

Workaround

Switch to a ternary expression for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions