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

transformer: react refresh panics when transforming typescript.js #5766

Closed
overlookmotel opened this issue Sep 13, 2024 · 1 comment · Fixed by #5768
Closed

transformer: react refresh panics when transforming typescript.js #5766

overlookmotel opened this issue Sep 13, 2024 · 1 comment · Fixed by #5768
Assignees
Labels
A-transformer Area - Transformer / Transpiler C-bug Category - Bug

Comments

@overlookmotel
Copy link
Contributor

I happened to run into this. When transforming typescript.js (one of fixtures used for minifier) with all transform options enabled, it panics:

thread 'main' panicked at crates/oxc_transformer/src/react/refresh.rs:933:52:
called `Option::unwrap()` on a `None` value
@overlookmotel overlookmotel added the C-bug Category - Bug label Sep 13, 2024
@Boshen Boshen changed the title Transformer panics when transforming typescript.js transformer: react refresh panics when transforming typescript.js Sep 13, 2024
@Boshen Boshen added the A-transformer Area - Transformer / Transpiler label Sep 13, 2024
@Boshen
Copy link
Member

Boshen commented Sep 13, 2024

name.chars().nth(3).unwrap() looks very dangerous 😄

Boshen pushed a commit that referenced this issue Sep 13, 2024
#5768)

close: #5766

I even forgot that React has a `use` hook in the latest version
@Dunqing Dunqing closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler C-bug Category - Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants