mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:27:35 +00:00
LibJS: Port ListFormat and PatternPartition to String
This commit is contained in:
parent
20536897e4
commit
1bcde5d216
10 changed files with 53 additions and 54 deletions
|
@ -148,7 +148,7 @@ ThrowCompletionOr<Vector<PatternPartitionWithUnit>> partition_relative_time_patt
|
|||
VERIFY(patterns.size() == 1);
|
||||
|
||||
// i. Let result be patterns.[[<valueString>]].
|
||||
auto result = patterns[0].pattern.to_deprecated_string();
|
||||
auto result = TRY_OR_THROW_OOM(vm, String::from_utf8(patterns[0].pattern));
|
||||
|
||||
// ii. Return a List containing the Record { [[Type]]: "literal", [[Value]]: result }.
|
||||
return Vector<PatternPartitionWithUnit> { { "literal"sv, move(result) } };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue