Skip to content

Commit af46598

Browse files
committed
fix bug with season 5 episode
1 parent b3e1232 commit af46598

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/api/fetchShow.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ import stripTags from 'striptags';
33

44
const formatSeasons = (allEpisodes) => {
55
const seasons = [
6-
{id:0, name: "Season 1", episodes: []},
7-
{id:1, name: "Season 2", episodes: []},
8-
{id:2, name: "Season 3", episodes: []},
9-
{id:3, name: "Season 4", episodes: []}
6+
{id:0, name: "Season 1", episodes: []},
7+
{id:1, name: "Season 2", episodes: []},
8+
{id:2, name: "Season 3", episodes: []},
9+
{id:3, name: "Season 4", episodes: []},
10+
{id:4, name: "Season 5", episodes: []},
1011
];
1112

1213
allEpisodes.forEach((episode) => {
@@ -26,7 +27,7 @@ const fetchShow = () => {
2627
.get("https://api.tvmaze.com/singlesearch/shows?q=stranger+things&embed=episodes")
2728
.then(res => {
2829
const { data } = res;
29-
30+
3031
return {
3132
name: data.name,
3233
image: data.image,

0 commit comments

Comments
 (0)