Skip to content

Commit 0a0c50a

Browse files
bteasapphi-red
andauthored
refactor: simplify pluginFilter implementation (#19828)
Co-authored-by: sapphi-red <[email protected]>
1 parent 172cbed commit 0a0c50a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/vite/src/node/plugins/pluginFilter.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ function createFilter(
7575
if (include?.some((filter) => filter(input))) {
7676
return true
7777
}
78-
return !!include && include.length > 0 ? false : true
78+
return !(include && include.length > 0)
7979
}
8080
}
8181

@@ -87,7 +87,7 @@ function normalizeFilter(filter: StringFilter): NormalizedStringFilter {
8787
}
8888
if (Array.isArray(filter)) {
8989
return {
90-
include: arraify(filter),
90+
include: filter,
9191
}
9292
}
9393
return {

0 commit comments

Comments
 (0)