Skip to content

Commit e5ab85d

Browse files
committed
Editorial: Remove else clauses after early returns
See new ECMA-262 convention tc39/ecma262#3733
1 parent dd606c1 commit e5ab85d

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

spec/calendar.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ <h1>
118118
1. Let _numberPart_ be ToZeroPaddedDecimalString(_monthNumber_, 2).
119119
1. If _isLeapMonth_ is *true*, then
120120
1. Return the string-concatenation of the code unit 0x004D (LATIN CAPITAL LETTER M), _numberPart_, and the code unit 0x004C (LATIN CAPITAL LETTER L).
121-
1. Else,
122-
1. Return the string-concatenation of the code unit 0x004D (LATIN CAPITAL LETTER M) and _numberPart_.
121+
1. Return the string-concatenation of the code unit 0x004D (LATIN CAPITAL LETTER M) and _numberPart_.
123122
</emu-alg>
124123
</emu-clause>
125124
</emu-clause>

spec/timezone.html

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,11 @@ <h1>
432432
1. Let _name_ be the source text matched by the |TimeZoneIANAName| Parse Node contained within _parseResult_.
433433
1. NOTE: _name_ is syntactically valid, but does not necessarily conform to <a href="https://data.iana.org/time-zones/theory.html#naming">IANA Time Zone Database naming guidelines</a> or correspond with an available named time zone identifier.
434434
1. Return Time Zone Identifier Parse Record { [[Name]]: CodePointsToString(_name_), [[OffsetMinutes]]: ~empty~ }.
435-
1. Else,
436-
1. Assert: _parseResult_ contains a |UTCOffset[~SubMinutePrecision]| Parse Node.
437-
1. Let _offset_ be the source text matched by the |UTCOffset[~SubMinutePrecision]| Parse Node contained within _parseResult_.
438-
1. Let _offsetNanoseconds_ be ! ParseDateTimeUTCOffset(CodePointsToString(_offset_)).
439-
1. Let _offsetMinutes_ be _offsetNanoseconds_ / (60 × 10<sup>9</sup>).
440-
1. Return Time Zone Identifier Parse Record { [[Name]]: ~empty~, [[OffsetMinutes]]: _offsetMinutes_ }.
435+
1. Assert: _parseResult_ contains a |UTCOffset[~SubMinutePrecision]| Parse Node.
436+
1. Let _offset_ be the source text matched by the |UTCOffset[~SubMinutePrecision]| Parse Node contained within _parseResult_.
437+
1. Let _offsetNanoseconds_ be ! ParseDateTimeUTCOffset(CodePointsToString(_offset_)).
438+
1. Let _offsetMinutes_ be _offsetNanoseconds_ / (60 × 10<sup>9</sup>).
439+
1. Return Time Zone Identifier Parse Record { [[Name]]: ~empty~, [[OffsetMinutes]]: _offsetMinutes_ }.
441440
</emu-alg>
442441
</emu-clause>
443442
</emu-clause>

0 commit comments

Comments
 (0)