mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibJS: Remove errant assertion from ParseISODateTime
This is an editorial change in the Temporal proposal. See: https://github.com/tc39/proposal-temporal/commit/728beeb
This commit is contained in:
parent
0e81092685
commit
784e872851
Notes:
github-actions[bot]
2024-12-05 21:06:31 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/784e872851f Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2790 Reviewed-by: https://github.com/gmta ✅
1 changed files with 3 additions and 9 deletions
|
@ -1201,16 +1201,10 @@ ThrowCompletionOr<ParsedISODateTime> parse_iso_date_time(VM& vm, StringView iso_
|
|||
return vm.throw_completion<RangeError>(ErrorType::TemporalInvalidCalendarIdentifier, *calendar);
|
||||
}
|
||||
|
||||
// 4. If goal is TemporalMonthDayString and parseResult does not contain a DateYear Parse Node, then
|
||||
if (goal == Production::TemporalMonthDayString && !parse_result->date_year.has_value()) {
|
||||
// a. Assert: goal is the last element of allowedFormats.
|
||||
// FIXME: Spec issue: This assertion is possibly incorrect.
|
||||
// https://github.com/tc39/proposal-temporal/issues/3045
|
||||
// VERIFY(goal == allowed_formats.last());
|
||||
|
||||
// b. Set yearAbsent to true.
|
||||
// 4. If goal is TemporalMonthDayString and parseResult does not contain a DateYear Parse Node, set
|
||||
// yearAbsent to true.
|
||||
if (goal == Production::TemporalMonthDayString && !parse_result->date_year.has_value())
|
||||
year_absent = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue