diff --git a/src/content/docs/en/guides/middleware.mdx b/src/content/docs/en/guides/middleware.mdx index 6c4f0b562c63d..60110a09d4d3c 100644 --- a/src/content/docs/en/guides/middleware.mdx +++ b/src/content/docs/en/guides/middleware.mdx @@ -208,7 +208,7 @@ Use `context.rewrite()` inside middleware to display a different page's content ```js title="src/middleware.js" import { isLoggedIn } from "~/auth.js" export function onRequest (context, next) { - if (!isLoggedIn(context) { + if (!isLoggedIn(context)) { // If the user is not logged in, update the Request to render the `/login` route and // add header to indicate where the user should be sent after a successful login. // Re-execute middleware. @@ -228,7 +228,7 @@ You can also pass the `next()` function an optional URL path parameter to rewrit ```js title="src/middleware.js" import { isLoggedIn } from "~/auth.js" export function onRequest (context, next) { - if (!isLoggedIn(context) { + if (!isLoggedIn(context)) { // If the user is not logged in, update the Request to render the `/login` route and // add header to indicate where the user should be sent after a successful login. // Return a new `context` to any following middlewares.