Skip to content

Commit af7e4cd

Browse files
authored
fix: allow ParallaxBanner child to be null
1 parent dc31c03 commit af7e4cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/ParallaxBanner/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const ParallaxBanner = (
5555
PropsWithChildren<{ targetElement: any }>
5656
>;
5757
// adds the targetElement prop to any ParallaxBannerLayer components
58-
if (item.type === ParallaxBannerLayer) {
58+
if (item?.type === ParallaxBannerLayer) {
5959
const clone = React.cloneElement(item, {
6060
targetElement,
6161
});

0 commit comments

Comments
 (0)