1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

LibJS: Port trivial use cases in the Intl namespace to String

This commit is contained in:
Timothy Flynn 2023-01-15 10:31:39 -05:00 committed by Linus Groh
parent edfdade9e9
commit fc413711ee
18 changed files with 72 additions and 70 deletions

View file

@ -33,7 +33,7 @@ static ThrowCompletionOr<Optional<DeprecatedString>> get_string_option(VM& vm, O
if (option.is_undefined())
return Optional<DeprecatedString> {};
if (validator && !validator(TRY(option.as_string().deprecated_string())))
if (validator && !validator(TRY(option.as_string().utf8_string_view())))
return vm.throw_completion<RangeError>(ErrorType::OptionIsNotValidValue, option, property);
return TRY(option.as_string().deprecated_string());