Skip to content

Commit 4f80b80

Browse files
committed
fix: ensure original input array is passed to callback
--- 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 7cfd30f commit 4f80b80

File tree

1 file changed

+3
-3
lines changed
  • lib/node_modules/@stdlib/stats/base/range-by/lib

1 file changed

+3
-3
lines changed

lib/node_modules/@stdlib/stats/base/range-by/lib/accessors.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ function rangeBy( N, x, strideX, offsetX, clbk, thisArg) {
6767
get = x.accessors[ 0 ];
6868

6969
if ( N === 1 || strideX === 0 ) {
70-
v = clbk.call( thisArg, get( xbuf, offsetX ), 0, offsetX, x );
70+
v = clbk.call( thisArg, get( xbuf, offsetX ), 0, offsetX, xbuf );
7171
if ( v === void 0 || isnan( v ) ) {
7272
return NaN;
7373
}
7474
return 0.0;
7575
}
7676
ix = offsetX;
7777
for ( i = 0; i < N; i++ ) {
78-
min = clbk.call( thisArg, get( xbuf, ix ), i, ix, x );
78+
min = clbk.call( thisArg, get( xbuf, ix ), i, ix, xbuf );
7979
if ( min !== void 0 ) {
8080
break;
8181
}
@@ -88,7 +88,7 @@ function rangeBy( N, x, strideX, offsetX, clbk, thisArg) {
8888
i += 1;
8989
for ( i; i < N; i++ ) {
9090
ix += strideX;
91-
v = clbk.call( thisArg, get( xbuf, ix ), i, ix, x );
91+
v = clbk.call( thisArg, get( xbuf, ix ), i, ix, xbuf );
9292
if ( v === void 0 ) {
9393
continue;
9494
}

0 commit comments

Comments
 (0)