diff --git a/src/routes/Player/Player.js b/src/routes/Player/Player.js index f1e0657d9..48218d126 100644 --- a/src/routes/Player/Player.js +++ b/src/routes/Player/Player.js @@ -404,6 +404,8 @@ const Player = ({ urlParams, queryParams }) => { // we explicitly set it to a global variable so we can access it in the onEnded function // this is not a good solution but it works for now window.playerNextVideo = player.nextVideo; + } else { + window.playerNextVideo = null; } }, [player.nextVideo, video.state.time, video.state.duration]);