Skip to content

Commit 92cba4c

Browse files
kgryteanandkaranubc
authored andcommitted
refactor: reorder expressions
--- 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: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent 38b878f commit 92cba4c

File tree

1 file changed

+1
-2
lines changed
  • lib/node_modules/@stdlib/ndarray/count-if/lib

1 file changed

+1
-2
lines changed

lib/node_modules/@stdlib/ndarray/count-if/lib/assign.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,6 @@ function assign( x, y, options, predicate, thisArg ) {
103103
if ( !isndarrayLike( y ) ) {
104104
throw new TypeError( format( 'invalid argument. Second argument must be an ndarray-like object. Value: `%s`.', y ) );
105105
}
106-
N = ndims( x );
107-
108106
// Case: assign( x, y, predicate )
109107
if ( nargs < 4 ) {
110108
cb = options;
@@ -137,6 +135,7 @@ function assign( x, y, options, predicate, thisArg ) {
137135
else {
138136
throw new TypeError( format( 'invalid argument. Fourth argument must be a function. Value: `%s`.', predicate ) );
139137
}
138+
N = ndims( x );
140139
opts = objectAssign( {}, defaults );
141140
if ( flg ) {
142141
err = validate( opts, N, o );

0 commit comments

Comments
 (0)