Skip to content

Commit c09eb44

Browse files
Trottrvagg
authored andcommitted
module: refactor redeclared variable
`homedir` was declared with `var` twice in the same scope in `lib/module.js`. This change makes it a single declaration. PR-URL: #4962 Reviewed-By: Brian White <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Roman Klauke <[email protected]>
1 parent 5a10fe9 commit c09eb44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎lib/module.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,11 @@ Module.runMain = function(){
452452
Module._initPaths=function(){
453453
constisWindows=process.platform==='win32';
454454

455+
varhomeDir;
455456
if(isWindows){
456-
varhomeDir=process.env.USERPROFILE;
457+
homeDir=process.env.USERPROFILE;
457458
}else{
458-
varhomeDir=process.env.HOME;
459+
homeDir=process.env.HOME;
459460
}
460461

461462
varpaths=[path.resolve(process.execPath,'..','..','lib','node')];

0 commit comments

Comments
(0)