Skip to content

Commit

Permalink
refactor: refactor code
Browse files Browse the repository at this point in the history
  • Loading branch information
swh00tw committed Mar 6, 2024
1 parent 2eb640e commit b8ce71c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions apps/recnet/src/app/admin/invite-code/provision/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function InviteCodeGenerateForm() {
<form
onSubmit={handleSubmit(async (data, e) => {
e?.preventDefault();
let owner: User | null;
let owner = user;
if (data.owner) {
// check if owner exists
try {
Expand All @@ -54,8 +54,6 @@ function InviteCodeGenerateForm() {
});
return;
}
} else {
owner = user;
}
if (!owner) {
// should never happen, for type safety
Expand Down

0 comments on commit b8ce71c

Please sign in to comment.