Skip to content

Commit

Permalink
fix(episode-container): check for null before sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangvu12 committed Sep 7, 2024
1 parent a53e433 commit 9b0b2af
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ const EpisodeContainer: React.FC<EpisodeContainerProps> = ({

<Else>
<EpisodeSectionSelector
episodes={data!.sort(
(a, b) => Number(b.number) - Number(a.number)
)}
episodes={
data?.sort((a, b) => Number(b.number) - Number(a.number))!
}
/>
<EpisodeChunkSelector />
<EpisodeLayoutContainer
Expand Down

0 comments on commit 9b0b2af

Please sign in to comment.