Skip to content

Commit e770bf2

Browse files
committed
fix undefined shorts
1 parent 85ee66c commit e770bf2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

components/youtube-shorts.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export function YouTubeShorts(props: { shorts: string[] }) {
3030
})
3131
}, [api])
3232

33-
if (shorts.length === 1) {
33+
if (!shorts?.length) return (<></>);
34+
35+
if (shorts?.length === 1) {
3436
return (
3537
<div className='flex items-center justify-center w-full'>
3638
<div className="aspect-w-9 aspect-h-16 w-full max-w-xs">

0 commit comments

Comments
 (0)