Fixed random movie

This commit is contained in:
zeldaroot 2019-12-03 03:11:26 +02:00
parent fbad5fde92
commit b69b987736
2 changed files with 3 additions and 3 deletions

View File

@ -44,8 +44,8 @@
<h2 class="subtitle-index">
<%- category.name %>
<div class="randomMovieIndex">
<div class="cinemapress-random-index"
onclick="window.location.href='<%- (category.url.indexOf('?')+1 ? category.url + '&random' : category.url + '?random') %>'"
<div <% if (!category.url) { %>style="display:none"<% } %> class="cinemapress-random-index"
onclick="window.location.href='<%- (category.url && category.url.indexOf('?')+1 ? category.url + '&random' : category.url + '?random') %>'"
title="<%- page.l.random %>">
<img src="/themes/<%- page.theme %>/public/images/dice.svg" alt="<%- page.l.random %>">
</div>

View File

@ -325,7 +325,7 @@
<%- category.name %>
<div class="randomMovieRelated">
<div class="cinemapress-random-related"
onclick="window.location.href='<%- (category.url.indexOf('?')+1 ? category.url + '&random' : category.url + '?random') %>'"
onclick="window.location.href='<%- (category.url && category.url.indexOf('?')+1 ? category.url + '&random' : category.url + '?random') %>'"
title="<%- page.l.random %>">
<img src="/themes/<%- page.theme %>/public/images/dice.svg" alt="<%- page.l.random %>">
</div>