Title: Error in 5.0.9 · Issue #157 · WebReflection/uhtml · GitHub
Open Graph Title: Error in 5.0.9 · Issue #157 · WebReflection/uhtml
X Title: Error in 5.0.9 · Issue #157 · WebReflection/uhtml
Description: Test case: import { html, signal } from './uhtml.js'; const items = signal([]); const ListItem = ({item}) => html` ${items.value.map((item) => html`<${ListItem} item=${item} />` ...
Open Graph Description: Test case: import { html, signal } from './uhtml.js'; const items = signal([]); const ListItem = ({item}) => html` ${items.value.map((item...
X Description: Test case: import { html, signal } from './uhtml.js'; const items = signal([]); const ListItem = ({item}) => html`<li>${item.text}</li>`; const List = ({items}) => html`&l...
Opengraph URL: https://github.com/WebReflection/uhtml/issues/157
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Error in 5.0.9","articleBody":"Test case:\n\n```\nimport { html, signal } from './uhtml.js';\n\nconst items = signal([]);\n\nconst ListItem = ({item}) =\u003e\n html`\u003cli\u003e${item.text}\u003c/li\u003e`;\n\nconst List = ({items}) =\u003e\n html`\u003cul\u003e\n ${items.value.map((item) =\u003e\n html`\u003c${ListItem} item=${item} /\u003e`\n )}\n \u003c/ul\u003e`;\n\ndocument.body.append(\n html`\u003c${List} items=${items} /\u003e`\n);\n\nfor (let i = 0; i \u003c 3; i++) {\n items.value = [...items.value, ({text: `item ${i}`})];\n}\n```\n\nThe loop errors on the 3rd iteration:\n\n\u003e Uncaught TypeError: can't access property \"text\", item is undefined\n\nIf I inline the `li` into `List` instead of a separate function, no error.\n\nIf I don't wrap the item in an object, and `items` is an array of strings, no error.\n\nIf I use the component fn directly instead of a nested tagged template, no error, eg:\n\n\u003e ${items.value.map(item =\u003e ListItem({item}))}","author":{"url":"https://github.com/autonome","@type":"Person","name":"autonome"},"datePublished":"2025-10-02T10:40:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/157/uhtml/issues/157"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cb59e19e-594a-d982-4d13-038f0ad937e3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9B42:1B63E2:3111F8C:4172522:696EFF8B |
| html-safe-nonce | 9e34c6aff415852632325ef65580d6f5a28fbf1f1e1a2563f0cc10d154ed9853 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjQyOjFCNjNFMjozMTExRjhDOjQxNzI1MjI6Njk2RUZGOEIiLCJ2aXNpdG9yX2lkIjoiODQxNTQ5MjUyNDY3NzUxNzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | e4b1181958cc01d78f2a3e7419534f597cab2a7cfd3cc860773a12ecb1bf0c61 |
| hovercard-subject-tag | issue:3477007274 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/WebReflection/uhtml/157/issue_layout |
| twitter:image | https://opengraph.githubassets.com/79179d8e5ca325345d78f778d6db83d93beb3834f7ef9710a5f9b5d7dd90735e/WebReflection/uhtml/issues/157 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/79179d8e5ca325345d78f778d6db83d93beb3834f7ef9710a5f9b5d7dd90735e/WebReflection/uhtml/issues/157 |
| og:image:alt | Test case: import { html, signal } from './uhtml.js'; const items = signal([]); const ListItem = ({item}) => html`
|
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | autonome |
| hostname | github.com |
| expected-hostname | github.com |
| None | b278ad162d35332b6de714dfb005de04386c4d92df6475522bef910f491a35ee |
| turbo-cache-control | no-preview |
| go-import | github.com/WebReflection/uhtml git https://github.com/WebReflection/uhtml.git |
| octolytics-dimension-user_id | 85749 |
| octolytics-dimension-user_login | WebReflection |
| octolytics-dimension-repository_id | 240760595 |
| octolytics-dimension-repository_nwo | WebReflection/uhtml |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 240760595 |
| octolytics-dimension-repository_network_root_nwo | WebReflection/uhtml |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 39aed5006635ab6f45e6b77d23e73b08a00272a3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width