mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:37:36 +00:00
LibJS: Rename ErrorType::IntlNumberIsNaN to ErrorType::NumberIsNaN
It will be used outside of the Intl namespace, so give it a less overly specific name.
This commit is contained in:
parent
deeee65e37
commit
7e0083fb65
4 changed files with 6 additions and 6 deletions
|
@ -1793,9 +1793,9 @@ ThrowCompletionOr<Vector<PatternPartitionWithSource>> partition_number_range_pat
|
|||
{
|
||||
// 1. If x is NaN or y is NaN, throw a RangeError exception.
|
||||
if (start.is_nan())
|
||||
return vm.throw_completion<RangeError>(ErrorType::IntlNumberIsNaN, "start"sv);
|
||||
return vm.throw_completion<RangeError>(ErrorType::NumberIsNaN, "start"sv);
|
||||
if (end.is_nan())
|
||||
return vm.throw_completion<RangeError>(ErrorType::IntlNumberIsNaN, "end"sv);
|
||||
return vm.throw_completion<RangeError>(ErrorType::NumberIsNaN, "end"sv);
|
||||
|
||||
// 2. Let result be a new empty List.
|
||||
Vector<PatternPartitionWithSource> result;
|
||||
|
|
|
@ -147,9 +147,9 @@ ThrowCompletionOr<::Locale::PluralCategory> resolve_plural_range(VM& vm, PluralR
|
|||
|
||||
// 5. If x is NaN or y is NaN, throw a RangeError exception.
|
||||
if (start.is_nan())
|
||||
return vm.throw_completion<RangeError>(ErrorType::IntlNumberIsNaN, "start"sv);
|
||||
return vm.throw_completion<RangeError>(ErrorType::NumberIsNaN, "start"sv);
|
||||
if (end.is_nan())
|
||||
return vm.throw_completion<RangeError>(ErrorType::IntlNumberIsNaN, "end"sv);
|
||||
return vm.throw_completion<RangeError>(ErrorType::NumberIsNaN, "end"sv);
|
||||
|
||||
// 6. Let xp be ! ResolvePlural(pluralRules, x).
|
||||
auto start_plurality = MUST_OR_THROW_OOM(resolve_plural(vm, plural_rules, start));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue