未验证 提交 6ca26bd9 编写于 作者: S Sam Bokai 提交者: GitHub

Rename import to solve conflicting usage of Error constructor (#13256)

上级 94e20be2
import Error from 'next/error'
import NextErrorComponent from 'next/error'
import * as Sentry from '@sentry/node'
const MyError = ({ statusCode, hasGetInitialPropsRun, err }) => {
......@@ -9,7 +9,7 @@ const MyError = ({ statusCode, hasGetInitialPropsRun, err }) => {
Sentry.captureException(err)
}
return <Error statusCode={statusCode} />
return <NextErrorComponent statusCode={statusCode} />
}
MyError.getInitialProps = async ({ res, err, asPath }) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册