Skip to content

Commit 0d0ad6b

Browse files
authored
web: null check (#204)
1 parent cbdb5ba commit 0d0ad6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

web/components/LikeButton.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function LikeButton({ summaryId, disabled = false }: LikeButtonProps) {
5353
}, [summaryId, userId]);
5454

5555
const handleLikeClick = async () => {
56-
if (!userId) return; // Prevent liking if not logged in
56+
if (!userId || !summaryId) return; // Prevent liking if not logged in
5757

5858
if (liked) {
5959
await supabase

0 commit comments

Comments
 (0)