Fix race condition when selecting job for first time

This commit is contained in:
Justin Edmund 2022-12-03 19:01:45 -08:00
parent 70ca827e5f
commit 2164b563d0

View file

@ -60,7 +60,8 @@ const JobSection = (props: Props) => {
useEffect(() => {
if (job) {
if (job.id != party.job.id) appState.party.job = job
if ((party.job && job.id != party.job.id) || !party.job)
appState.party.job = job
if (job.row === "1") setNumSkills(3)
else setNumSkills(4)
}