Skip to content

Commit

Permalink
chore: .filter .at -> .find
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Sep 12, 2024
1 parent 1d15b4e commit 82ef59d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/Session.astro
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ const schedule = days
day.activities.flatMap((activity) =>
activity.within
?.filter((inner) => inner.type === "session" && inner.session === slug)
.map((activity) => ({ activity, day })),
.map((inner) => ({ activity: inner, day })),
),
)
.filter((x) => !!x?.activity)
.at(0)!;
.find((x) => !!x?.activity)!;
---

<li class:list={["talk", className]} id={slug} {...rest}>
Expand Down

0 comments on commit 82ef59d

Please sign in to comment.