Fix with-sentry-simple example (#13404)

Previous referencing the incorrect `Error` global.
This commit is contained in:
Joe Haddad 2020-05-26 12:58:03 -04:00 committed by GitHub
parent b3e45fab5e
commit dcfa35faa6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,7 +13,10 @@ const MyError = ({ statusCode, hasGetInitialPropsRun, err }) => {
}
MyError.getInitialProps = async ({ res, err, asPath }) => {
const errorInitialProps = await Error.getInitialProps({ res, err })
const errorInitialProps = await NextErrorComponent.getInitialProps({
res,
err,
})
// Workaround for https://github.com/zeit/next.js/issues/8592, mark when
// getInitialProps has run