Skip to content

Commit

Permalink
fix: uncaught exception from playlist countdown component (#314)
Browse files Browse the repository at this point in the history
add `next` existence protection
  • Loading branch information
yairans committed Dec 11, 2018
1 parent 48a4132 commit ec71046
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/playlist-countdown/playlist-countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ class PlaylistCountdown extends BaseComponent {
*/
render(props: any): React$Element<any> | void {
const next = props.playlist.next;
if (!(next && next.sources)) {
return undefined;
}
const countdown = this.player.playlist.countdown;
const timeToShow = this._getTimeToShow();
const progressTime = props.currentTime - timeToShow;
Expand Down

0 comments on commit ec71046

Please sign in to comment.