Skip to content

Commit 6341bfb

Browse files
committed
Fix type error
1 parent 7844a2d commit 6341bfb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/app/conf/2024/speakers/[id]/page.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ export default function SpeakerPage({ params }: SpeakerProps) {
4343
const speaker = speakers.find(s => s.username === decodedId)!
4444

4545
const s = schedule
46-
.filter(s => s.speakers && s.speakers.some(s => s.username === decodedId))
46+
.filter((s): s is typeof s & Required<Pick<typeof s, "speakers">> =>
47+
Boolean(s.speakers && s.speakers.some(s => s.username === decodedId)),
48+
)
4749
.map(s => ({
4850
...s,
4951
speakers: s.speakers.map(

0 commit comments

Comments
 (0)