-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
- P3: minor bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)table
Description
What version of astro are you using?
1.0.0-beta.44
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
When trying to map over an array to produce multiple td inside a tr inside a table, Astro crashes with an error that's not really useful for the user (the line number doesn't match the actual file and the error itself does not correspond to the code).
<table>
<tr>
{[0,1,2].map(x => (
<td>{x}</td>
))}
</tr>
</table>Transform failed with 1 error:
/home/projects/github-rrohxf/src/pages/index.astro:31:6: ERROR: Expected ")" but found "}"
Error: Transform failed with 1 error:
/home/projects/github-rrohxf/src/pages/index.astro:31:6: ERROR: Expected ")" but found "}"
at failureErrorWithLog (/home/projects/github-rrohxf/node_modules/esbuild/lib/main.js:1557:15)
at start/< (/home/projects/github-rrohxf/node_modules/esbuild/lib/main.js:1346:29)
at sendRequest/< (/home/projects/github-rrohxf/node_modules/esbuild/lib/main.js:637:17)
at handleIncomingPacket (/home/projects/github-rrohxf/node_modules/esbuild/lib/main.js:73…
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-rrohxf?file=src/pages/index.astro
Participation
- I am willing to submit a pull request for this issue.
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)table