summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorMichael Hunteman <michael@huntm.net>2024-09-01 12:05:28 -0700
committerMichael Hunteman <michael@huntm.net>2024-09-01 12:05:28 -0700
commitbf45c312cee85dfa52d3993c662208130e9be8dd (patch)
tree021b4846a51eb1c57c3804dd9d2ade687ea2515c /client
parent9e6c97e532ef9970fc975123abaca86c4ce9b6b1 (diff)
Fix precedence for previous party size nullish check
Diffstat (limited to 'client')
-rw-r--r--client/src/components/RsvpForm.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/components/RsvpForm.tsx b/client/src/components/RsvpForm.tsx
index b3ed3b3..5fdf390 100644
--- a/client/src/components/RsvpForm.tsx
+++ b/client/src/components/RsvpForm.tsx
@@ -40,7 +40,7 @@ function RsvpForm() {
const [updateGuest, { isLoading, isSuccess, isError }] =
useUpdateGuestMutation();
const guest: Guest = useOutletContext();
- const previousPartySize = useRef(guest.partySize ?? 1 - 1);
+ const previousPartySize = useRef((guest.partySize ?? 1) - 1);
const [open, setOpen] = useState<boolean>(false);
useEffect(() => {