Skip to content

[html] runtime error: props undefined in <For> #2582

@trusktr

Description

@trusktr

Describe the bug

A <For> loop's props become undefined when a different has a textContent interpolation site.

Your Example Website or App

https://playground.solidjs.com/anonymous/b2f0f6af-64e6-4076-9778-c474624a1e3e

Steps to Reproduce the Bug or Issue

  1. see the playground link
  2. notice it has an error Uncaught TypeError: Cannot use 'in' operator to search for 'fallback' in undefined because props passed into the For component is undefined
  3. remove the <style> tag and the error goes away.

Expected behavior

The For shouldn't be broken.

Screenshots or Videos

Image

Platform

  • OS: macOS
  • Browser: Chrome/Safari
  • Version: 144/26

Additional context

Looks like this is specific to html. I can't reproduce with JSX:

https://playground.solidjs.com/anonymous/813a4dc5-31b8-4bbc-9acc-036da13224d4

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