diff --git a/crates/oxc_transformer/src/react/refresh.rs b/crates/oxc_transformer/src/react/refresh.rs index e53294b151e3d..d878e01962d72 100644 --- a/crates/oxc_transformer/src/react/refresh.rs +++ b/crates/oxc_transformer/src/react/refresh.rs @@ -926,7 +926,7 @@ impl<'a> ReactRefresh<'a> { } fn is_componentish_name(name: &str) -> bool { - name.chars().next().unwrap().is_ascii_uppercase() + name.as_bytes().first().is_some_and(u8::is_ascii_uppercase) } fn is_use_hook_name(name: &str) -> bool {