[BUG] JSX comments crash inside fragments
- Dominant language
- JavaScript
- Stars
- 1.2k
- Forks
- 47
- PR merge metrics
- No merged PRs in 30d
Description
When adding a comment as a child of a fragment, it suddenly breaks things:
```tsx
import { Component } from "@geajs/core";
import type { JSX } from "@geajs/core/jsx-runtime";
export type FooButtonProps = JSX.IntrinsicElements["button"];
export class FooButton extends Component {
template({ children, class: cls, ...props }: FooButtonProps) {
return (
<>
{/* */}
{children}
);
}
}
```
// throws
// Uncaught TypeError: Cannot read properties of undefined (reading 'firstChild')
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the supplied TSX reproduction in the JSX transform and DOM patching paths, then trace the fragment comment case to the undefined value whose firstChild access fails. Done means a JSX comment can appear as a fragment child without throwing while the surrounding button still renders correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100