Skip to content

Commit

Permalink
refactor(ecmascript): Remove unnecessary check
Browse files Browse the repository at this point in the history
  • Loading branch information
magic-akari committed Oct 15, 2024
1 parent 89f1888 commit abf47e5
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions crates/oxc_ecmascript/src/string_to_number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ impl StringToNumber for &str {

if radix != 0 {
let s = &s[2..];
if s.is_empty() {
return f64::NAN;
}

// Fast path
if let Ok(value) = u32::from_str_radix(s, radix) {
Expand Down

0 comments on commit abf47e5

Please sign in to comment.