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

LibJS: Add assertion (comment) to MakeMatchIndicesIndexPairArray

This is an editorial change in the ECMA-262 spec.

See: caa6e3f
This commit is contained in:
Linus Groh 2022-05-03 21:27:10 +02:00
parent ede932287f
commit b9bbf45a81

View file

@ -149,6 +149,7 @@ static Value make_match_indices_index_pair_array(GlobalObject& global_object, Ut
auto match_indices_array = get_match_index_par(global_object, string, entry.value); auto match_indices_array = get_match_index_par(global_object, string, entry.value);
// e. If i > 0 and groupNames[i - 1] is not undefined, then // e. If i > 0 and groupNames[i - 1] is not undefined, then
// i. Assert: groups is not undefined.
// ii. Perform ! CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndicesArray). // ii. Perform ! CreateDataPropertyOrThrow(groups, groupNames[i - 1], matchIndicesArray).
MUST(groups.as_object().create_data_property_or_throw(entry.key, match_indices_array)); MUST(groups.as_object().create_data_property_or_throw(entry.key, match_indices_array));
} }