diff --git a/src/pages/Character/CharacterCreatePage/components/ImageInput.tsx b/src/pages/Character/CharacterCreatePage/components/ImageInput.tsx index baae86e9..f5e8bb59 100644 --- a/src/pages/Character/CharacterCreatePage/components/ImageInput.tsx +++ b/src/pages/Character/CharacterCreatePage/components/ImageInput.tsx @@ -14,7 +14,7 @@ export interface ImageInputProps { export function ImageInput(props: ImageInputProps) { const { value, onChange, watch } = props; - const name = watch("name", ""); + const name = watch("name") ?? ""; const [dialogOpen, setDialogOpen] = useState(false); diff --git a/src/pages/Character/CharacterCreatePage/hooks/useSyncHomebrewContent.tsx b/src/pages/Character/CharacterCreatePage/hooks/useSyncHomebrewContent.tsx index b31089c9..eae599a8 100644 --- a/src/pages/Character/CharacterCreatePage/hooks/useSyncHomebrewContent.tsx +++ b/src/pages/Character/CharacterCreatePage/hooks/useSyncHomebrewContent.tsx @@ -8,11 +8,12 @@ export function useSyncHomebrewContent( watch: UseFormWatch
, campaignId?: string ) { - const expansionMap = watch("enabledExpansionMap", {}); + const expansionMap = watch("enabledExpansionMap"); + // const expansionMap = watch("enabledExpansionMap", {}); const expansions = useMemo( () => - Object.keys(expansionMap).filter( + Object.keys(expansionMap ?? {}).filter( (expansionId) => expansionMap[expansionId] ), [expansionMap]