mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 13:19:02 +00:00
LibJS: Fix typo in GetMatchIndexPair definition
This commit is contained in:
parent
77d9508618
commit
772479b334
Notes:
github-actions[bot]
2025-07-22 21:12:40 +00:00
Author: https://github.com/trflynn89
Commit: 772479b334
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5569
Reviewed-by: https://github.com/gmta ✅
1 changed files with 3 additions and 3 deletions
|
@ -84,7 +84,7 @@ struct Match {
|
|||
};
|
||||
|
||||
// 22.2.7.7 GetMatchIndexPair ( S, match ), https://tc39.es/ecma262/#sec-getmatchindexpair
|
||||
static Value get_match_index_par(VM& vm, Utf16View const& string, Match const& match)
|
||||
static Value get_match_index_pair(VM& vm, Utf16View const& string, Match const& match)
|
||||
{
|
||||
auto& realm = *vm.current_realm();
|
||||
|
||||
|
@ -145,14 +145,14 @@ static Value make_match_indices_index_pair_array(VM& vm, Utf16View const& string
|
|||
// i. Let matchIndicesArray be undefined.
|
||||
auto match_indices_array = js_undefined();
|
||||
if (match_indices.has_value())
|
||||
match_indices_array = get_match_index_par(vm, string, *match_indices);
|
||||
match_indices_array = get_match_index_pair(vm, string, *match_indices);
|
||||
|
||||
// d. Perform ! CreateDataPropertyOrThrow(A, ! ToString(i), matchIndicesArray).
|
||||
MUST(array->create_data_property_or_throw(i, match_indices_array));
|
||||
}
|
||||
|
||||
for (auto const& entry : group_names) {
|
||||
auto match_indices_array = get_match_index_par(vm, string, entry.value);
|
||||
auto match_indices_array = get_match_index_pair(vm, string, entry.value);
|
||||
|
||||
// e. If i > 0 and groupNames[i - 1] is not undefined, then
|
||||
// i. Assert: groups is not undefined.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue