Skip to content

Commit

Permalink
Editorial: Prefer returning static values after alias comparison
Browse files Browse the repository at this point in the history
Better aligns with ECMA-262
  • Loading branch information
gibson042 authored and ptomato committed Jul 13, 2023
1 parent 41cf516 commit 736d6db
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions spec/abstractops.html
Original file line number Diff line number Diff line change
Expand Up @@ -578,8 +578,7 @@ <h1>ToRelativeTemporalObject ( _options_ )</h1>
<emu-alg>
1. Assert: Type(_options_) is Object.
1. Let _value_ be ? Get(_options_, *"relativeTo"*).
1. If _value_ is *undefined*, then
1. Return _value_.
1. If _value_ is *undefined*, return *undefined*.
1. Let _offsetBehaviour_ be ~option~.
1. Let _matchBehaviour_ be ~match exactly~.
1. If Type(_value_) is Object, then
Expand Down
4 changes: 2 additions & 2 deletions spec/intl.html
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@ <h1>
<emu-alg>
1. Assert: Type(_calendar_) is Object.
1. Let _result_ be ? Invoke(_calendar_, *"era"*, « _dateLike_ »).
1. If _result_ is *undefined*, return _result_.
1. If _result_ is *undefined*, return *undefined*.
1. If Type(_result_) is not String, throw a *TypeError* exception.
1. Return _result_.
</emu-alg>
Expand All @@ -1437,7 +1437,7 @@ <h1>
<emu-alg>
1. Assert: Type(_calendar_) is Object.
1. Let _result_ be ? Invoke(_calendar_, *"eraYear"*, « _dateLike_ »).
1. If _result_ is *undefined*, return _result_.
1. If _result_ is *undefined*, return *undefined*.
1. If Type(_result_) is not Number, throw a *TypeError* exception.
1. If IsIntegralNumber(_result_) is *false*, throw a *RangeError* exception.
1. Return ℝ(_result_).
Expand Down

0 comments on commit 736d6db

Please sign in to comment.