Skip to content

Commit

Permalink
chore: replace 'some' with 'includes' in resolveEnvPrefix (#15220)
Browse files Browse the repository at this point in the history
  • Loading branch information
leewakin committed Dec 4, 2023
1 parent 14be75f commit ee12f30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function resolveEnvPrefix({
envPrefix = 'VITE_',
}: UserConfig): string[] {
envPrefix = arraify(envPrefix)
if (envPrefix.some((prefix) => prefix === '')) {
if (envPrefix.includes('')) {
throw new Error(
`envPrefix option contains value '', which could lead unexpected exposure of sensitive information.`,
)
Expand Down

0 comments on commit ee12f30

Please sign in to comment.