Skip to content

Commit 9143b39

Browse files
committed
simplify code
1 parent 368b7f3 commit 9143b39

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

if-changed.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ const result = child_process
1313
if (result) {
1414
console.log(result);
1515

16-
const dirs = result
17-
.split('\n')
18-
.filter(file => file)
19-
.map(file => path.resolve(path.dirname(file)));
16+
const dirs = result.split('\n').filter(file => file);
2017

2118
for (const dir of dirs) {
2219
if (dir.startsWith(currentPath)) {

0 commit comments

Comments
 (0)