Open kireerik opened 1 year ago
Can you provide a repro showing that it's not working? It seems to be working for me (stackblitz). Maybe https://live-astro-compiler.vercel.app can help you visualize how the await
gets evaluated.
Looks like the problem is that you can't use set:html={await ...}
in a Fragment
(or any component), because it generates code like:
`${$$renderComponent($$result,'Fragment',Fragment,{},{"default": () => $$render`${$$unescapeHTML(await value)}`,})}`
Maybe it could be ... "default": async () ...
to fix it.
Ah that's a good callout @bluwy. This is technically a compiler issue, I'm going to transfer this over there.
What version of
astro
are you using?2.5.7
Are you using an SSR adapter? If so, which one?
no
What package manager are you using?
pnpm
What operating system are you using?
Windows
What browser are you using?
Chrome
Describe the Bug
In some cases this consistently works.
The error says:
or
if I try it a bit differently
Examples:
In this case for example it does not work:
In this case for example it does work (consistently) (with the bug described in the (below) issue (but as I am trying the same in the context of this issue it is consistently not working)):
Link to Minimal Reproducible Example
⠀
Participation