From 2348c049d633693bf2f51e3138f0aa2008aa8a66 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 30 Dec 2022 07:00:41 -0800 Subject: [PATCH] Fix optional error when checking job --- components/JobDropdown/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/JobDropdown/index.tsx b/components/JobDropdown/index.tsx index 30a76750..9e7843ef 100644 --- a/components/JobDropdown/index.tsx +++ b/components/JobDropdown/index.tsx @@ -41,7 +41,7 @@ const JobDropdown = React.forwardRef( // Set current job from state on mount useEffect(() => { - if (party.job.id !== '-1') { + if (party.job?.id !== '-1') { setCurrentJob(party.job) } }, [])