Add error boundnary for sidebar paths too

b538960 added an error boundnary for pages not directly linked on the
sidebar, but forgot to add it for pages on the sidebar.  This add the
missing error boundnary for those pages.
This commit is contained in:
Hornwitser committed 2021-03-01 15:03:25 +01:00
1 parent a3729504e5
commit d0befe5944
1 file changed
+3 -1
@@ -75,7 +75,9 @@ export default function SiteLayout(props) {
<Switch>
{sidebar.map(({path, content}) => <Route exact path={path} key={path}>
<SetSidebar path={path} />
{content}
<ErrorBoundary Component={ErrorPage}>
{content}
</ErrorBoundary>
</Route>)}
{pages.map(page => <Route exact path={page.path} key={page.path}>
<SetSidebar path={page.sidebarPath} />