mirror of
https://github.com/Jellify-Music/App.git
synced 2026-05-08 12:29:30 -05:00
fix horizontal card list when data is undefined
This commit is contained in:
@@ -30,7 +30,7 @@ export default function HorizontalCardList({
|
||||
return (
|
||||
<FlatList
|
||||
horizontal
|
||||
data={(props.data as Array<BaseItemDto>).slice(0, cutoff - 1)}
|
||||
data={(props.data as Array<BaseItemDto> | undefined)?.slice(0, cutoff - 1) ?? undefined}
|
||||
renderItem={props.renderItem}
|
||||
ListFooterComponent={() => {
|
||||
return props.data ? (
|
||||
|
||||
Reference in New Issue
Block a user