Skip to content

Commit

Permalink
Merge pull request #18 from Lorg0n/bugs/EpisodeBugFix
Browse files Browse the repository at this point in the history
fix(profile): add validation of episodes_total in handleAddEpisode
  • Loading branch information
olexh authored May 11, 2024
2 parents 5c4cef7 + c58b10d commit 0e06a66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/(pages)/(root)/components/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 0e06a66

Please sign in to comment.