Skip to content

Commit afe65eb

Browse files
authored
fix: check for Middleware manifest & chain (#1435)
* fix: add check for sortedMiddleware * chore: prettier * chore: double check * chore: too much ctrl z
1 parent bd7887b commit afe65eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

plugin/src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const plugin: NetlifyPlugin = {
148148

149149
const middlewareManifest = await loadMiddlewareManifest(netlifyConfig)
150150

151-
if (!process.env.NEXT_USE_NETLIFY_EDGE && middlewareManifest.sortedMiddleware.length !== 0) {
151+
if (!process.env.NEXT_USE_NETLIFY_EDGE && middlewareManifest?.sortedMiddleware?.length) {
152152
console.log(
153153
yellowBright(outdent`
154154
You are using Next.js Middleware without Netlify Edge Functions.

0 commit comments

Comments
 (0)