Skip to content

Commit

Permalink
refactor: no need to use Object property
Browse files Browse the repository at this point in the history
  • Loading branch information
devjiwonchoi committed Jun 25, 2024
1 parent bdc89fc commit 408b162
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/next/src/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,12 +726,8 @@ export default async function build(
)

if (config.requiredEnv.length > 0) {
const envs = Object.assign({}, config.env, combinedEnv)
const envKeys = new Set(Object.keys(envs))

const missingKeys = config.requiredEnv.filter(
(key) => !envKeys.has(key)
)
const envs = { ...config.env, ...combinedEnv }
const missingKeys = config.requiredEnv.filter((key) => !(key in envs))

Log.error(
`Missing required environment variables: ${missingKeys.join(', ')}`
Expand Down

0 comments on commit 408b162

Please sign in to comment.