-
Notifications
You must be signed in to change notification settings - Fork 99
Waiting for tag value consistently not working in some cases in Astro components #854
Copy link
Copy link
Open
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)
Description
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:
"await" can only be used inside an "async" function
or
Parse failure: Cannot use keyword 'await' outside an async function
if I try it a bit differently
Examples:
---
---
<<any element name> set:html={await method()}/>---
---
{await method()}---
---
{await value}
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
- I am willing to submit a pull request for this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)