diff --git a/package-lock.json b/package-lock.json index 64701e7130..be6b466257 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22910,7 +22910,7 @@ }, "plugin": { "name": "@netlify/plugin-nextjs", - "version": "4.9.3", + "version": "4.10.0", "license": "ISC", "dependencies": { "@netlify/functions": "^1.0.0", diff --git a/plugin/src/index.ts b/plugin/src/index.ts index b4b39a3080..d6d18521c1 100644 --- a/plugin/src/index.ts +++ b/plugin/src/index.ts @@ -148,7 +148,7 @@ const plugin: NetlifyPlugin = { const middlewareManifest = await loadMiddlewareManifest(netlifyConfig) - if (!process.env.NEXT_USE_NETLIFY_EDGE && middlewareManifest.sortedMiddleware.length !== 0) { + if (!process.env.NEXT_USE_NETLIFY_EDGE && middlewareManifest?.sortedMiddleware?.length) { console.log( yellowBright(outdent` You are using Next.js Middleware without Netlify Edge Functions.