mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-06 01:26:22 +00:00
LibJS: Port trivial use cases in the Intl namespace to String
This commit is contained in:
parent
edfdade9e9
commit
fc413711ee
Notes:
sideshowbarker
2024-07-17 20:22:04 +09:00
Author: https://github.com/trflynn89
Commit: fc413711ee
Pull-request: https://github.com/SerenityOS/serenity/pull/17031
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg
18 changed files with 72 additions and 70 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue