Skip to content

Commit

Permalink
fix duplicated no index
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Jul 13, 2023
1 parent 3a8219b commit 118ed4d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions packages/next/src/server/app-render/app-render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1487,11 +1487,7 @@ export async function renderToHTMLOrFlight(
flushedErrorMetaTagsUntilIndex++
) {
const error = allCapturedErrors[flushedErrorMetaTagsUntilIndex]
if (isNotFoundError(error)) {
errorMetaTags.push(
<meta name="robots" content="noindex" key={error.digest} />
)
} else if (isRedirectError(error)) {
if (isRedirectError(error)) {
const redirectUrl = getURLFromRedirectError(error)
if (redirectUrl) {
errorMetaTags.push(
Expand Down

0 comments on commit 118ed4d

Please sign in to comment.