mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:07:35 +00:00
LibJS: Capture TimeFraction parse result instead of Fraction
Not much of a difference as TimeFraction just parses Fraction, but let's
do it correctly. Small mistake I did in 4b7f716
.
Thanks to YouTube user gla3dr for noticing this :^)
This commit is contained in:
parent
99b263a2db
commit
f7fe7f8c77
3 changed files with 8 additions and 4 deletions
|
@ -440,7 +440,6 @@ bool ISO8601Parser::parse_fraction()
|
|||
return false;
|
||||
if (!parse_fractional_part())
|
||||
return false;
|
||||
m_state.parse_result.fractional_part = transaction.parsed_string_view();
|
||||
transaction.commit();
|
||||
return true;
|
||||
}
|
||||
|
@ -450,7 +449,12 @@ bool ISO8601Parser::parse_time_fraction()
|
|||
{
|
||||
// TimeFraction :
|
||||
// Fraction
|
||||
return parse_fraction();
|
||||
StateTransaction transaction { *this };
|
||||
if (!parse_fraction())
|
||||
return false;
|
||||
m_state.parse_result.time_fraction = transaction.parsed_string_view();
|
||||
transaction.commit();
|
||||
return true;
|
||||
}
|
||||
|
||||
// https://tc39.es/proposal-temporal/#prod-TimeZoneUTCOffsetSign
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue