Skip to content

Commit

Permalink
remove unrelated
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed Nov 23, 2024
1 parent 1a7e7d9 commit 7e7c004
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/next/src/client/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -928,10 +928,7 @@ export async function hydrate(opts?: { beforeRender?: () => Promise<void> }) {

error.name = initialErr!.name
error.stack = initialErr!.stack

if ('digest' in initialErr) {
;(error as any).digest = initialErr!.digest
}
const errSource = initialErr.source!

// In development, error the navigation API usage in runtime,
// since it's not allowed to be used in pages router as it doesn't contain error boundary like app router.
Expand All @@ -940,8 +937,7 @@ export async function hydrate(opts?: { beforeRender?: () => Promise<void> }) {
'Next.js navigation API is not allowed to be used in Pages Router.'
}

const errSource = 'source' in initialErr ? initialErr.source : null
throw getServerError(error, errSource || 'server')
throw getServerError(error, errSource)
})
}
// We replaced the server-side error with a client-side error, and should
Expand Down

0 comments on commit 7e7c004

Please sign in to comment.