fix: more type errors (191 -> 181 errors)
- Fix DetailItem.svelte to accept boolean and null values - Fix proficiency access in database/characters/[id]/+page.svelte Co-Authored-By: Justin Edmund <justin@jedmund.com>
This commit is contained in:
parent
cf7a036575
commit
6e735f08a3
2 changed files with 3 additions and 3 deletions
|
|
@ -21,7 +21,7 @@
|
|||
placeholder
|
||||
}: {
|
||||
label: string
|
||||
value?: string | number | undefined
|
||||
value?: string | number | boolean | null | undefined
|
||||
children?: Snippet
|
||||
editable?: boolean
|
||||
type?: 'text' | 'number' | 'select' | 'checkbox'
|
||||
|
|
|
|||
|
|
@ -333,8 +333,8 @@
|
|||
<DetailItem label="Race 2" value={getRaceLabel(character.race?.[1])} />
|
||||
{/if}
|
||||
<DetailItem label="Gender" value={getGenderLabel(character.gender)} />
|
||||
<DetailItem label="Proficiency 1" value={getProficiencyLabel(character.proficiency[0])} />
|
||||
<DetailItem label="Proficiency 2" value={getProficiencyLabel(character.proficiency[1])} />
|
||||
<DetailItem label="Proficiency 1" value={getProficiencyLabel(character.proficiency?.[0] ?? 0)} />
|
||||
<DetailItem label="Proficiency 2" value={getProficiencyLabel(character.proficiency?.[1] ?? 0)} />
|
||||
{/if}
|
||||
</DetailsContainer>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue