We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94fb9ce commit 609d9e9Copy full SHA for 609d9e9
lib/node_modules/@stdlib/array/base/to-inserted-at/lib/main.js
@@ -53,7 +53,7 @@ var assign = require( './assign.js' );
53
function toInsertedAt( x, index, value ) {
54
var out;
55
56
- index = normalizeIndex( index, x.length-1 );
+ index = normalizeIndex( index, x.length );
57
if ( index < 0 ) {
58
throw new RangeError( format( 'invalid argument. Index argument is out-of-bounds. Value: `%d`.', index ) );
59
}
0 commit comments