From b0b0219896664ef09278fe005e7af39be526ee93 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Sun, 10 Apr 2022 13:07:02 -0700 Subject: [PATCH] Don't crash when loading parties without jobs --- components/JobSection/index.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/components/JobSection/index.tsx b/components/JobSection/index.tsx index bff3d818..787e9add 100644 --- a/components/JobSection/index.tsx +++ b/components/JobSection/index.tsx @@ -8,9 +8,7 @@ import { appState } from '~utils/appState' import './index.scss' // Props -interface Props { - currentJob?: string -} +interface Props {} const JobSection = (props: Props) => { const [job, setJob] = useState() @@ -28,8 +26,7 @@ const JobSection = (props: Props) => { }) useEffect(() => { - if (job) - appState.party.job = job + if (job) appState.party.job = job }, [job]) function receiveJob(job?: Job) { @@ -57,7 +54,7 @@ const JobSection = (props: Props) => {