提交 ff7299d1 编写于 作者: J JJ Kasper 提交者: Tim Neutkens

Update react-error-overlay and use reportRuntimeError (#6577)

Fixes: #5481
上级 1930d736
......@@ -96,6 +96,9 @@ export default function connect (options) {
subscribeToHmrEvent (handler) {
customHmrEventHandler = handler
},
reportRuntimeError (err) {
ErrorOverlay.reportRuntimeError(err)
},
prepareError (err) {
// Temporary workaround for https://github.com/facebook/create-react-app/issues/4760
// Should be removed once the fix lands
......
......@@ -130,7 +130,9 @@ export async function renderError (props) {
const { App, err } = props
if (process.env.NODE_ENV !== 'production') {
throw webpackHMR.prepareError(err)
return webpackHMR.reportRuntimeError(
webpackHMR.prepareError(err)
)
}
// Make sure we log the error to the console, otherwise users can't track down issues.
......
......@@ -71,7 +71,7 @@
"next-server": "8.0.4-canary.9",
"prop-types": "15.6.2",
"prop-types-exact": "1.2.0",
"react-error-overlay": "4.0.0",
"react-error-overlay": "5.1.4",
"react-is": "16.6.3",
"recursive-copy": "2.0.6",
"resolve": "1.5.0",
......
......@@ -10177,10 +10177,10 @@ react-dom@16.8.0:
prop-types "^15.6.2"
scheduler "^0.13.0"
react-error-overlay@4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-4.0.0.tgz#d198408a85b4070937a98667f500c832f86bd5d4"
integrity sha512-FlsPxavEyMuR6TjVbSSywovXSEyOg6ZDj5+Z8nbsRl9EkOzAhEIcS+GLoQDC5fz/t9suhUXWmUrOBrgeUvrMxw==
react-error-overlay@5.1.4:
version "5.1.4"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.4.tgz#88dfb88857c18ceb3b9f95076f850d7121776991"
integrity sha512-fp+U98OMZcnduQ+NSEiQa4s/XMsbp+5KlydmkbESOw4P69iWZ68ZMFM5a2BuE0FgqPBKApJyRuYHR95jM8lAmg==
react-is@16.6.3:
version "16.6.3"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册