Fix empty torrents returned as array in show episodes
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

The show episodes can handle undefined values themselves.
This commit is contained in:
Grégoire Delattre 2020-04-09 11:02:34 +02:00
parent c9c3541b4e
commit e3f6ff1fe2

View File

@ -19,10 +19,8 @@ export const EpisodeTorrentsButton = ({ season, episode }) => {
? state.show.show.seasons.get(season).get(episode).fetching
: false
);
const torrents = useSelector((state) =>
state.show.show.seasons.get(season).get(episode).torrents
? state.show.show.seasons.get(season).get(episode).torrents
: []
const torrents = useSelector(
(state) => state.show.show.seasons.get(season).get(episode).torrents
);
const url = useSelector(