Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fragment does'n work in custom JSX Component #3235

Closed
karolskolasinski opened this issue Aug 6, 2024 · 1 comment · Fixed by #3241
Closed

Fragment does'n work in custom JSX Component #3235

karolskolasinski opened this issue Aug 6, 2024 · 1 comment · Fixed by #3241
Labels

Comments

@karolskolasinski
Copy link

What version of Hono are you using?

4.5.1

What runtime/platform is your app running on?

Deno

What steps can reproduce the bug?

  • create custom JSX Component
function MyComponent() {
  return <></>;
}
  • use this component
  return <MyComponent></MyComponent>;

and the app crash.

What is the expected behavior?

should render Fragment without import

What do you see instead?

2024-08-06T08:11:01.631Z [ERROR] [client] TypeError: Cannot read properties of null (reading 'isEscaped')
    at JSXFunctionNode.toStringToBuffer (https://jsr.io/@hono/hono/4.5.1/src/jsx/base.ts:251:64)
    at JSXFunctionNode.toString (https://jsr.io/@hono/hono/4.5.1/src/jsx/base.ts:143:12)
    at html (https://jsr.io/@hono/hono/4.5.1/src/helper/html/index.ts:35:29)

Additional information

if you import import { Fragment } from "hono/jsx/jsx-runtime"; it works, but IDE not report any info that something is wrong

@usualoma
Copy link
Member

usualoma commented Aug 6, 2024

Hi @karolskolasinski, Thank you for your report.
I will investigate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants