diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-11-18 17:28:22 -0600 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-11-18 17:28:22 -0600 |
| commit | 04d9b16a6bcab99b0aa25214f0ac16c3605d7602 (patch) | |
| tree | 4ac9f23005bfc9f39d86e29ee47f51882a08ac10 | |
| parent | 43961ef03515d3e5caf551f9536e9d24470582be (diff) | |
| download | invidious-04d9b16a6bcab99b0aa25214f0ac16c3605d7602.tar.gz invidious-04d9b16a6bcab99b0aa25214f0ac16c3605d7602.tar.bz2 invidious-04d9b16a6bcab99b0aa25214f0ac16c3605d7602.zip | |
Add fix for optional 'rvs'
| -rw-r--r-- | src/invidious/views/watch.ecr | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/invidious/views/watch.ecr b/src/invidious/views/watch.ecr index 9dbd8834..16634948 100644 --- a/src/invidious/views/watch.ecr +++ b/src/invidious/views/watch.ecr @@ -152,7 +152,7 @@ <% end %> <% rvs.each do |rv| %> - <% if rv.has_key?("id") %> + <% if rv["id"]? %> <a href="/watch?v=<%= rv["id"] %>"> <% if preferences && preferences.thin_mode %> <% else %> @@ -177,7 +177,7 @@ <% if !rvs.empty? && !plid && params[:continue] %> player.on('ended', function() { window.location.replace("/watch?v=" - + "<%= rvs[0]?.try &.["id"] %>" + + "<%= rvs.select { |rv| rv["id"]? }[0]? %>" + "&continue=1" <% if params[:listen] %> + "&listen=1" @@ -196,7 +196,7 @@ function continue_autoplay(target) { if (target.checked) { player.on('ended', function() { window.location.replace("/watch?v=" - + "<%= rvs[0]?.try &.["id"] %>" + + "<%= rvs.select { |rv| rv["id"]? }[0]? %>" + "&continue=1" <% if params[:listen] %> + "&listen=1" |
