1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Prevent flooding when an error occurs (#2351)

This commit is contained in:
Olivier Tassinari 2017-07-02 08:29:19 +02:00 committed by Arunoda Susiripala
parent 3e7ca1e89e
commit a07c7c448b

View file

@ -42,8 +42,10 @@ ReactReconciler.mountComponent = function (...args) {
try {
return originalMountComponent(...args)
} catch (err) {
next.renderError(err)
err.abort = true
if (!err.abort) {
next.renderError(err)
err.abort = true
}
throw err
}
}