Skip to content

Commit

Permalink
Merge pull request #1059 from Moso-sudo/fix-1013
Browse files Browse the repository at this point in the history
Fix:1013 Prevent TypeError by safely accessing step?.type
  • Loading branch information
Marchand-Nicolas authored Jan 24, 2025
2 parents 1c8a379 + 887e537 commit 805772d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/admin/quests/dashboard/[questId]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -721,9 +721,11 @@ const handleTabChange = (pageOrUpdater: SetStateAction<number>) => {
} else if (currentPage === 1) {
return (showBoost && boostInputValid) || nftUriValid || questRewardValid;
}

if (currentPage === 2) {
return steps.some((step) => step.type === "None");
return steps.some((step) => step?.type === "None");
}

return false;
}, [
currentPage,
Expand Down

0 comments on commit 805772d

Please sign in to comment.