From c58b10d14ceec22aa0901ce63742ef90d4ad66d2 Mon Sep 17 00:00:00 2001 From: Lorg0n Date: Sat, 11 May 2024 23:06:20 +0300 Subject: [PATCH] fix(profile): add validation of episodes_total in handleAddEpisode --- app/(pages)/(root)/components/profile.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/(pages)/(root)/components/profile.tsx b/app/(pages)/(root)/components/profile.tsx index 825d9ce3..6e44cd58 100644 --- a/app/(pages)/(root)/components/profile.tsx +++ b/app/(pages)/(root)/components/profile.tsx @@ -67,7 +67,7 @@ const Profile = () => { const episodes = (variables?.params?.episodes || selectedWatch.episodes) + 1; - if (episodes > selectedWatch.anime.episodes_total) return; + if (selectedWatch.anime.episodes_total && episodes > selectedWatch.anime.episodes_total) return; mutateAddWatch({ params: {