diff --git a/src/components/features/charactersAndCampaigns/CustomTrack.tsx b/src/components/features/charactersAndCampaigns/CustomTrack.tsx index 96ddca43..07204065 100644 --- a/src/components/features/charactersAndCampaigns/CustomTrack.tsx +++ b/src/components/features/charactersAndCampaigns/CustomTrack.tsx @@ -53,7 +53,11 @@ export function CustomTrack(props: CustomTrackProps) { exclusive disabled={disabled || loading} value={value} - onChange={(evt, value) => onChange(value)} + onChange={(evt, newValue) => { + if (newValue !== undefined && newValue !== null) { + onChange(newValue); + } + }} sx={[ { width: "100%", diff --git a/src/pages/Character/CharacterSheetPage/components/StatsSection.tsx b/src/pages/Character/CharacterSheetPage/components/StatsSection.tsx index c783e01b..89f8e8a2 100644 --- a/src/pages/Character/CharacterSheetPage/components/StatsSection.tsx +++ b/src/pages/Character/CharacterSheetPage/components/StatsSection.tsx @@ -101,6 +101,7 @@ export function StatsSection() { label={track.label} value={ customTrackValues[track.label] !== undefined && + customTrackValues[track.label] !== null && typeof track.values[customTrackValues[track.label]].value === "number" ? (track.values[customTrackValues[track.label]].value as number)