Skip to content

Commit 9889c81

Browse files
committed
refactor: remove unnecessary variable
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 0023e16 commit 9889c81

File tree

1 file changed

+1
-3
lines changed
  • lib/node_modules/@stdlib/ndarray/flatten/lib

1 file changed

+1
-3
lines changed

lib/node_modules/@stdlib/ndarray/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)