You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When template contains iterables besides an array, for instance like a Set, SSR does not actually render the values.
For example:
This
render(){returnhtml`<p>new Set([1, 2, 3])</p>`;}
results in a paragraph tag containing [object Set].
The same is true for other iterables that normally work client-side like Map or Generator, which means using the map() directive results in [object Generator].
This also breaks during hydration as there's a mismatch of the number of parts, displaying the following error:
Which package(s) are affected?
SSR (@lit-labs/ssr)
Description
When template contains iterables besides an array, for instance like a
Set
, SSR does not actually render the values.For example:
This
results in a paragraph tag containing
[object Set]
.The same is true for other iterables that normally work client-side like
Map
orGenerator
, which means using themap()
directive results in[object Generator]
.This also breaks during hydration as there's a mismatch of the number of parts, displaying the following error:
Reproduction
https://stackblitz.com/edit/koa-starter-3x2kbs?file=index.js
Workaround
Use
Array.from()
Is this a regression?
No or unsure. This never worked, or I haven't tried before.
Affected versions
2.2.1
Browser/OS/Node environment
Node version: v16.15.0
The text was updated successfully, but these errors were encountered: