diff options
author | Michael Hunteman <michael@huntm.net> | 2024-09-01 12:05:28 -0700 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2024-09-01 12:05:28 -0700 |
commit | bf45c312cee85dfa52d3993c662208130e9be8dd (patch) | |
tree | 021b4846a51eb1c57c3804dd9d2ade687ea2515c | |
parent | 9e6c97e532ef9970fc975123abaca86c4ce9b6b1 (diff) |
Fix precedence for previous party size nullish check
-rw-r--r-- | client/src/components/RsvpForm.tsx | 2 |
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(() => { |