File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -155,14 +155,17 @@ export const writeEdgeFunctions = async (netlifyConfig: NetlifyConfig) => {
155155 } )
156156 manifest . functions . push ( functionDefinition )
157157 }
158-
159- for ( const edgeFunctionDefinition of Object . values ( middlewareManifest . functions ) ) {
160- const functionDefinition = await writeEdgeFunction ( {
161- edgeFunctionDefinition,
162- edgeFunctionRoot,
163- netlifyConfig,
164- } )
165- manifest . functions . push ( functionDefinition )
158+ // Older versions of the manifest format don't have the functions field
159+ // No, the version field was not incremented
160+ if ( typeof middlewareManifest . functions === 'object' ) {
161+ for ( const edgeFunctionDefinition of Object . values ( middlewareManifest . functions ) ) {
162+ const functionDefinition = await writeEdgeFunction ( {
163+ edgeFunctionDefinition,
164+ edgeFunctionRoot,
165+ netlifyConfig,
166+ } )
167+ manifest . functions . push ( functionDefinition )
168+ }
166169 }
167170
168171 await writeJson ( join ( edgeFunctionRoot , 'manifest.json' ) , manifest )
You can’t perform that action at this time.
0 commit comments