Skip to content

Commit

Permalink
fix(component): layout dynamic children
Browse files Browse the repository at this point in the history
  • Loading branch information
insekkei committed Feb 24, 2022
1 parent d24ba00 commit 54a297f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/layout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const Layout = (props: LayoutProps) => {

useEffect(() => {
React.Children.forEach(children, (child: React.ReactChild) => {
if (typeof child !== 'object') return;
if (!child || typeof child !== 'object') return;

if (child.type === Aside) setAsides([child]);
});
Expand Down

0 comments on commit 54a297f

Please sign in to comment.