Skip to content

Commit

Permalink
update checks
Browse files Browse the repository at this point in the history
  • Loading branch information
tctree333 committed Jun 21, 2023
1 parent 8d3b1f2 commit 28bede7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/validator/tournament.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ export default yup.object().shape({
"recommended-short-name",
"$$warn$$ field 'short name:' could be changed to a recommended name",
async (value, context) => {
if (await existingTournament(context.parent.name as string)) {
if (
!context.parent["name"] ||
(await existingTournament(context.parent.name as string))
) {
return true;
}

Expand Down

0 comments on commit 28bede7

Please sign in to comment.