mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00:00
LibJS: Convert CanonicalNumericIndexString to use NumberToString
This commit is contained in:
parent
9a5a4302d9
commit
36d72a7f4c
Notes:
sideshowbarker
2024-07-17 10:10:18 +09:00
Author: https://github.com/trflynn89
Commit: 36d72a7f4c
Pull-request: https://github.com/SerenityOS/serenity/pull/17461
Reviewed-by: https://github.com/linusg
5 changed files with 14 additions and 13 deletions
|
@ -144,7 +144,7 @@ ThrowCompletionOr<Optional<Value>> PrimitiveString::get(VM& vm, PropertyKey cons
|
|||
return Value(static_cast<double>(length));
|
||||
}
|
||||
}
|
||||
auto index = canonical_numeric_index_string(property_key, CanonicalIndexMode::IgnoreNumericRoundtrip);
|
||||
auto index = MUST_OR_THROW_OOM(canonical_numeric_index_string(vm, property_key, CanonicalIndexMode::IgnoreNumericRoundtrip));
|
||||
if (!index.is_index())
|
||||
return Optional<Value> {};
|
||||
auto str = TRY(utf16_string_view());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue