Don't allow selecting skill without selecting job

This commit is contained in:
Justin Edmund 2023-01-29 02:11:07 -08:00
parent f2160b827c
commit 2a202bb60d

View file

@ -115,7 +115,7 @@ const JobSection = (props: Props) => {
const canEditSkill = (skill?: JobSkill) => {
// If there is a job and a skill present in the slot
if (job) {
if (job && job.id !== '-1') {
// If the skill's job is one of the job's main skill
if (skill && skill.job.id === job.id && skill.main) return false