Skip to content

fix: render nullish meta attributes as empty instead of "undefined" - #81

Open
xrtis wants to merge 1 commit into
solidjs:0.xfrom
xrtis:fix-ssg-nullish-attributes
Open

xrtis wants to merge 1 commit into
solidjs:0.xfrom
xrtis:fix-ssg-nullish-attributes

Conversation

@xrtis

@xrtis xrtis commented Nov 9, 2026

Copy link
Copy Markdown

Hi 👋

Same issue as #71, but for props instead of children: during SSR, renderTags serializes nullish props as the literal string "undefined", because escape passes non-strings through untouched.

<Meta charset="utf-8" nonce={undefined} /> // → <meta data-sm="…" charset="utf-8" nonce="undefined"/>

Solid's own ssrElement skips nullish values. This bites TanStack Router, which passes nonce: router.options.ssr?.nonce to every head tag, so every tag in <head> gets nonce="undefined" when no nonce is configured.

Thanks

@ryansolid ryansolid added the 1.x Solid 1 line (0.29.x, main) label Nov 17, 2026 — with Claude

Copy link
Copy Markdown
Member

Thank you for this. Closing as part of the Solid 2.0 cleanup: @solidjs/meta 2.0.0 is a rewrite on top of Solid 2.0's built-in head registry, and the 0.x line on the old main isn't getting further changes. If the same problem shows up on 2.0.0, please open an issue or a PR against the current main.


Generated by Claude Code

@ryansolid ryansolid closed this Nov 17, 2026
@ryansolid ryansolid reopened this Nov 17, 2026

Copy link
Copy Markdown
Member

Reopened, sorry about the noise. This is a non-breaking fix for the Solid 1 line, which now lives on the 0.x branch, so it stays open for a 0.29.x release.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.x Solid 1 line (0.29.x, main)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants