Skip to content

Commit 0e105bd

Browse files
PerfectPantargos
authored andcommitted
assert: replace var with let in lib/assert.js
Refs: nodejs/code-and-learn#97 PR-URL: #30261 Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent c01a7fb commit 0e105bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎lib/assert.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ function getCode(fd, line, column) {
185185
buffer=lines<line ? buffer : Buffer.allocUnsafe(bytesPerRead);
186186
bytesRead=readSync(fd,buffer,0,bytesPerRead);
187187
// Read the buffer until the required code line is found.
188-
for(vari=0;i<bytesRead;i++){
188+
for(leti=0;i<bytesRead;i++){
189189
if(buffer[i]===10&&++lines===line){
190190
// If the end of file is reached, directly parse the code and return.
191191
if(bytesRead<bytesPerRead){
@@ -822,7 +822,7 @@ assert.ifError = function ifError(err) {
822822
tmp2.shift();
823823
// Filter all frames existing in err.stack.
824824
lettmp1=newErr.stack.split('\n');
825-
for(vari=0;i<tmp2.length;i++){
825+
for(leti=0;i<tmp2.length;i++){
826826
// Find the first occurrence of the frame.
827827
constpos=tmp1.indexOf(tmp2[i]);
828828
if(pos!==-1){

0 commit comments

Comments
 (0)