Skip to content

Commit 6fdd877

Browse files
committed
Auto-generated commit
1 parent d1e87b7 commit 6fdd877

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,7 @@ A total of 27 issues were closed in this release:
602602

603603
<details>
604604

605+
- [`9889c81`](https://github.com/stdlib-js/stdlib/commit/9889c81a20c4f0d6115dcf2f65a1bf9f1072cf26) - **refactor:** remove unnecessary variable _(by Athan Reines)_
605606
- [`0023e16`](https://github.com/stdlib-js/stdlib/commit/0023e164329d4c737ab86ea2654adec96a217f86) - **refactor:** update error message _(by Athan Reines)_
606607
- [`157f4f4`](https://github.com/stdlib-js/stdlib/commit/157f4f4cd7cc3ce680dbfb538b3d8cbcfe5852dd) - **docs:** update comments _(by Athan Reines)_
607608
- [`17b3ee2`](https://github.com/stdlib-js/stdlib/commit/17b3ee291d0ff12089dcf3ff881771b41325ff28) - **chore:** fix C lint errors [(#8181)](https://github.com/stdlib-js/stdlib/pull/8181) _(by Piyush Goel, Athan Reines)_

flatten/lib/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,6 @@ var COL_MAJOR = 'column-major';
281281
* // returns [ 6.0, 5.0, 4.0, 3.0, 2.0, 1.0 ]
282282
*/
283283
function flatten( x, options ) {
284-
var nargs;
285284
var view;
286285
var opts;
287286
var xsh;
@@ -292,7 +291,6 @@ function flatten( x, options ) {
292291
if ( !isndarrayLike( x ) ) {
293292
throw new TypeError( format( 'invalid argument. First argument must be an ndarray. Value: `%s`.', x ) );
294293
}
295-
nargs = arguments.length;
296294
xsh = getShape( x );
297295

298296
// Define default options:
@@ -303,7 +301,7 @@ function flatten( x, options ) {
303301
};
304302

305303
// Resolve function options...
306-
if ( nargs > 1 ) {
304+
if ( arguments.length > 1 ) {
307305
if ( !isPlainObject( options ) ) {
308306
throw new TypeError( format( 'invalid argument. Options argument must be an object. Value: `%s`.', options ) );
309307
}

0 commit comments

Comments
 (0)