Skip to content

Commit

Permalink
Check for undefined in only (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Jan 22, 2024
1 parent 4f0bd60 commit 52948e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/swc/sources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ export async function globSources(

const f = files.flat().filter(filename => {
return (
only.length === 0 || only.some(only => minimatch(slash(filename), only))
!only ||
only.length === 0 ||
only.some(only => minimatch(slash(filename), only))
);
});

Expand Down

0 comments on commit 52948e9

Please sign in to comment.