Skip to content

Commit a15c95c

Browse files
committed
fix: avoid nullish coalesce
1 parent 11b15ac commit a15c95c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/api/walker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export class Walker<TOutput extends Output> {
5555
symlinks: new Map(),
5656
visited: [""].slice(0, 0),
5757
controller: new Aborter(),
58-
fs: options.fs ?? nativeFs,
58+
fs: options.fs || nativeFs,
5959
};
6060

6161
/*
@@ -71,12 +71,12 @@ export class Walker<TOutput extends Output> {
7171
this.resolveSymlink = resolveSymlink.build(options, this.isSynchronous);
7272
this.walkDirectory = walkDirectory.build(this.isSynchronous);
7373
this.pushPath =
74-
pushPath ??
74+
pushPath ||
7575
((p, arr) => {
7676
arr.push(p);
7777
});
7878
this.pushGroup =
79-
pushGroup ??
79+
pushGroup ||
8080
((group, arr) => {
8181
arr.push(group);
8282
});

0 commit comments

Comments
 (0)