Skip to content

Commit 609d9e9

Browse files
ShabiShett07kgryte
andauthored
fix: indexing
Co-authored-by: Athan <[email protected]> Signed-off-by: Shabareesh Shetty <[email protected]>
1 parent 94fb9ce commit 609d9e9

File tree

1 file changed

+1
-1
lines changed
  • lib/node_modules/@stdlib/array/base/to-inserted-at/lib

1 file changed

+1
-1
lines changed

lib/node_modules/@stdlib/array/base/to-inserted-at/lib/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ var assign = require( './assign.js' );
5353
function toInsertedAt( x, index, value ) {
5454
var out;
5555

56-
index = normalizeIndex( index, x.length-1 );
56+
index = normalizeIndex( index, x.length );
5757
if ( index < 0 ) {
5858
throw new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%d`.', index ) );
5959
}

0 commit comments

Comments
 (0)