Fix race condition when selecting job for first time
This commit is contained in:
parent
70ca827e5f
commit
2164b563d0
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue