Skip to content

Commit d3741a1

Browse files
authored
refactor: reduce branch complexity
Signed-off-by: Athan <[email protected]>
1 parent 562a476 commit d3741a1

File tree

1 file changed

+2
-3
lines changed
  • lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of/lib

1 file changed

+2
-3
lines changed

lib/node_modules/@stdlib/blas/ext/base/ndarray/dlast-index-of/lib/main.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ function dlastIndexOf( arrays ) {
7171
fromIndex = ndarraylike2scalar( arrays[ 2 ] );
7272

7373
if ( fromIndex < 0 ) {
74-
if ( fromIndex >= -N ) {
75-
fromIndex += N;
76-
} else {
74+
fromIndex += N;
75+
if ( fromIndex < 0 ) {
7776
return -1;
7877
}
7978
} else if ( fromIndex >= N ) {

0 commit comments

Comments
 (0)