Skip to content

Commit 35625fc

Browse files
committed
Fixes crash
1 parent b58f376 commit 35625fc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/containers/post/HorizontalAd.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ function HorizontalAd({}: Props) {
2222
threshold: 0,
2323
},
2424
);
25-
observer.observe(ref.current!);
25+
if (!ref.current) return;
26+
observer.observe(ref.current);
2627
return () => {
2728
observer.disconnect();
2829
};

0 commit comments

Comments
 (0)