Commit a85a8f25 authored by Amaury Martiny's avatar Amaury Martiny

In prod, redirect to / on error

parent 18d908be
......@@ -33,6 +33,10 @@ const Router =
class App extends Component {
componentDidCatch (err) {
debug(err.message);
if (process.env.NODE_ENV !== 'development') {
// Redirect to '/' on errors
window.location.href = '/';
}
}
render () {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment