Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 3c67777

Browse files
Also for TypedArray
1 parent cf37fae commit 3c67777

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ <h1>%TypedArray%.prototype.with ( _index_, _value_ )</h1>
308308
1. Let _O_ be the *this* value.
309309
1. Perform ? ValidateTypedArray(_O_).
310310
1. Let _len_ be _O_.[[ArrayLength]].
311-
1. If IsIntegralNumber(_index_) is *false*, throw a *RangeError* exception.
312-
1. If _index_ &lt; 0, let _actualIndex_ be _len_ + _index_.
313-
1. Else, let _actualIndex_ be _index_.
311+
1. Let _relativeIndex_ be ? ToIntegerOrInfinity(_index_).
312+
1. If _index_ &ge; 0, let _actualIndex_ be _relativeIndex_.
313+
1. Else, let _actualIndex_ be _len_ + _relativeIndex_.
314314
1. If ! IsValidIntegerIndex(_O_, _actualIndex_) is *false*, throw a *RangeError* exception.
315315
1. Let _A_ be ? TypedArraySpeciesCreate(_O_, &laquo; 𝔽(_len_) &raquo;, *true*).
316316
1. Let _k_ be 0.

0 commit comments

Comments
 (0)