Handle potential undefined value on CardRows (#834)
This commit is contained in:
parent
b65c972da1
commit
6a619240fa
4 changed files with 4 additions and 4 deletions
|
@ -202,7 +202,7 @@ export const AlbumCard = ({
|
||||||
<ImageSection />
|
<ImageSection />
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
<DetailSection style={{ width: '100%' }}>
|
<DetailSection style={{ width: '100%' }}>
|
||||||
{cardRows.map((_row: CardRow<Album>, index: number) => (
|
{(cardRows || []).map((_row: CardRow<Album>, index: number) => (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
visible
|
visible
|
||||||
height={15}
|
height={15}
|
||||||
|
|
|
@ -191,7 +191,7 @@ export const PosterCard = ({
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
<DetailContainer>
|
<DetailContainer>
|
||||||
<Stack spacing="sm">
|
<Stack spacing="sm">
|
||||||
{controls.cardRows.map((row, index) => (
|
{(controls?.cardRows || []).map((row, index) => (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
key={`${index}-${row.arrayProperty}`}
|
key={`${index}-${row.arrayProperty}`}
|
||||||
visible
|
visible
|
||||||
|
|
|
@ -234,7 +234,7 @@ export const DefaultCard = ({
|
||||||
</ImageContainer>
|
</ImageContainer>
|
||||||
<DetailContainer>
|
<DetailContainer>
|
||||||
<Stack spacing="sm">
|
<Stack spacing="sm">
|
||||||
{controls.cardRows.map((row, index) => (
|
{(controls?.cardRows || []).map((row, index) => (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
key={`${index}-${columnIndex}-${row.arrayProperty}`}
|
key={`${index}-${columnIndex}-${row.arrayProperty}`}
|
||||||
visible
|
visible
|
||||||
|
|
|
@ -219,7 +219,7 @@ export const PosterCard = ({
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
<DetailContainer>
|
<DetailContainer>
|
||||||
<Stack spacing="sm">
|
<Stack spacing="sm">
|
||||||
{controls.cardRows.map((row, index) => (
|
{(controls?.cardRows || []).map((row, index) => (
|
||||||
<Skeleton
|
<Skeleton
|
||||||
key={`${index}-${columnIndex}-${row.arrayProperty}`}
|
key={`${index}-${columnIndex}-${row.arrayProperty}`}
|
||||||
visible
|
visible
|
||||||
|
|
Reference in a new issue