Skip to content

Commit

Permalink
fix: don't let people submit of name is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
xnought committed Nov 27, 2023
1 parent 39c5af0 commit 324aea4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/routes/edit/[proteinName]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@
}
}
}}
disabled={name === humanReadableProteinName(entry.name) &&
content === entry.content}>Edit Protein</Button
disabled={(name !== humanReadableProteinName(entry.name) ||
content !== entry.content) &&
name.length === 0}>Edit Protein</Button
>

<Button
Expand Down

0 comments on commit 324aea4

Please sign in to comment.