Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/node_modules/@stdlib/utils/async/if-then/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,14 @@ function ifthenAsync( predicate, x, y, done ) {
*/
function clbk2( error ) {
var nargs;
var args;
var i;
if ( error ) {
return done( error );
}
nargs = arguments.length;
args = new Array( nargs );
args[ 0 ] = null;
const args = [null];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use const.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kgryte ,

Thank you for the feedback. I understand that "const" isn't typically used in this context. I'll adjust my code accordingly to align with the project's coding conventions.

Could you please clarify if there are specific patterns or alternatives you recommend for variable declarations in this situation?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can start by actually looking at the file that you are editing.

for ( i = 1; i < nargs; i++ ) {
args[ i ] = arguments[ i ];
args.push(arguments[ i ]);
}
done.apply( null, args );
}
Expand Down