Skip to content

Commit f2eff8d

Browse files
gibson042ljharb
authored andcommitted
Editorial: Clean up StringGetOwnProperty (#3523)
Remove a redundant check and swap comparison operands for a more conventional ordering.
1 parent 0d1e2a8 commit f2eff8d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

spec.html

+1-2
Original file line numberDiff line numberDiff line change
@@ -14430,13 +14430,12 @@ <h1>
1443014430
<emu-alg>
1443114431
1. If _P_ is not a String, return *undefined*.
1443214432
1. Let _index_ be CanonicalNumericIndexString(_P_).
14433-
1. If _index_ is *undefined*, return *undefined*.
1443414433
1. If _index_ is not an integral Number, return *undefined*.
1443514434
1. If _index_ is *-0*<sub>𝔽</sub> or _index_ &lt; *-0*<sub>𝔽</sub>, return *undefined*.
1443614435
1. Let _str_ be _S_.[[StringData]].
1443714436
1. Assert: _str_ is a String.
1443814437
1. Let _len_ be the length of _str_.
14439-
1. If _len_ ≤ ℝ(_index_), return *undefined*.
14438+
1. If ℝ(_index_) ≥ _len_, return *undefined*.
1444014439
1. Let _resultStr_ be the substring of _str_ from ℝ(_index_) to ℝ(_index_) + 1.
1444114440
1. Return the PropertyDescriptor { [[Value]]: _resultStr_, [[Writable]]: *false*, [[Enumerable]]: *true*, [[Configurable]]: *false* }.
1444214441
</emu-alg>

0 commit comments

Comments
 (0)