Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
yossydev committed Jan 30, 2025
1 parent 8e63517 commit c399d6a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ impl StringConstructor {
unreachable!();
};
let next_cp = next_cp.into_i64();
if next_cp < 0 || next_cp > 0x10FFFF {
if !(0..=0x10FFFF).contains(&next_cp) {
return Err(agent.throw_exception(
ExceptionType::RangeError,
format!("{:?} is not a valid code point", next_cp),
Expand All @@ -210,7 +210,7 @@ impl StringConstructor {
unreachable!();
};
let next_cp = next_cp.into_i64();
if next_cp < 0 || next_cp > 0x10FFFF {
if !(0..=0x10FFFF).contains(&next_cp) {
return Err(agent.throw_exception(
ExceptionType::RangeError,
format!("{:?} is not a valid code point", next_cp),
Expand Down

0 comments on commit c399d6a

Please sign in to comment.