Skip to content

Commit

Permalink
fix: environments might be an empty object
Browse files Browse the repository at this point in the history
  • Loading branch information
GauBen authored Jan 14, 2025
1 parent 0802662 commit cdf0720
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/baseEnvironment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export class PartialEnvironment {
constructor(
name: string,
topLevelConfig: ResolvedConfig,
options: ResolvedEnvironmentOptions = topLevelConfig.environments[name],
options: ResolvedEnvironmentOptions = topLevelConfig.environments?.[name] ?? {},
) {
// only allow some characters so that we can use name without escaping for directory names
// and make users easier to access with `environments.*`
Expand Down

0 comments on commit cdf0720

Please sign in to comment.