We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91d4b81 commit f859b0cCopy full SHA for f859b0c
src/build/functions/edge.ts
@@ -132,9 +132,11 @@ const copyHandlerDependencies = async (
132
133
const outputFile = join(destDir, `server/${name}.js`)
134
135
- // Prepare environment variables for draft-mode (i.e. __NEXT_PREVIEW_MODE_ID, __NEXT_PREVIEW_MODE_SIGNING_KEY, __NEXT_PREVIEW_MODE_ENCRYPTION_KEY)
136
- for (const [key, value] of Object.entries(env)) {
137
- parts.push(`process.env.${key} = '${value}';`)
+ if (env) {
+ // Prepare environment variables for draft-mode (i.e. __NEXT_PREVIEW_MODE_ID, __NEXT_PREVIEW_MODE_SIGNING_KEY, __NEXT_PREVIEW_MODE_ENCRYPTION_KEY)
+ for (const [key, value] of Object.entries(env)) {
138
+ parts.push(`process.env.${key} = '${value}';`)
139
+ }
140
}
141
142
if (wasm?.length) {
0 commit comments