Skip to content

Commit 74cda2e

Browse files
committed
Removed unused if statement.
1 parent 1d83d23 commit 74cda2e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/utils.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,13 @@ const findPackageFileInPath = input => {
2727

2828
const stat = fs.statSync(input);
2929

30-
if (stat) {
30+
if (stat.isFile()) {
3131

32-
if (stat.isFile()) {
32+
return path.resolve(path.join(path.dirname(input), '/package.json'));
3333

34-
return path.resolve(path.join(path.dirname(input), '/package.json'));
34+
} else if (stat.isDirectory()) {
3535

36-
} else if (stat.isDirectory()) {
37-
38-
return path.resolve(path.join(input, '/package.json'));
39-
40-
}
36+
return path.resolve(path.join(input, '/package.json'));
4137

4238
}
4339

0 commit comments

Comments
 (0)