Skip to content

Commit fd9991b

Browse files
committed
fix: remove conditional
--- 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: passed - 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 05cf2e6 commit fd9991b

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/node_modules/@stdlib/ndarray/base/some-by/lib/main.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,7 @@ function someBy( arrays, predicate, thisArg ) {
196196

197197
// Resolve the success criterion:
198198
N = n.accessors[ 0 ]( n.data, n.offset );
199-
if ( N < 1 ) {
200-
return true;
201-
}
199+
202200
// Determine whether we can avoid iteration altogether...
203201
if ( ndims === 0 ) {
204202
if ( x.accessorProtocol ) {

lib/node_modules/@stdlib/ndarray/base/some-by/test/test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ tape( 'the function returns `false` if provided an empty input ndarray', functio
5656
}
5757
});
5858

59-
tape( 'the function returns `true` if a provided `n` parameter is less than zero', function test( t ) {
59+
tape( 'the function returns `false` if a provided `n` parameter is less than zero', function test( t ) {
6060
var actual;
6161
var x;
6262
var n;
@@ -67,7 +67,7 @@ tape( 'the function returns `true` if a provided `n` parameter is less than zero
6767
});
6868

6969
actual = someBy( [ x, n ], clbk );
70-
t.strictEqual( actual, true, 'returns expected value' );
70+
t.strictEqual( actual, false, 'returns expected value' );
7171

7272
t.end();
7373

0 commit comments

Comments
 (0)