Changed check category

This commit is contained in:
zeldaroot 2020-05-05 22:03:42 +03:00
parent f4fe20ad6a
commit 5a0c25a19b
3 changed files with 4 additions and 4 deletions

View File

@ -44,7 +44,7 @@
<%- category.name %>
</div>
<% if (category.movies.length) {
<% if (typeof category === 'object' && category.movies && category.movies.length) {
[category.movies.shift()].forEach(function (movie) { %>
<div id="now-playing" class="slider slider-main">
@ -69,7 +69,7 @@
<div class="now-playing-list main-page">
<% var moreEpisodes = false; %>
<% if (category.movies.length) {
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.forEach(function (movie) { %>
<div class="list-item" <% if (movie.hide) { moreEpisodes = true; %>style="display:none"

View File

@ -56,7 +56,7 @@
</h2>
</div>
<div class="cinemapress-content-main">
<% if (category.movies.length) {
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.forEach(function (movie) { %>
<article class="shortstory line">
<div class="short">

View File

@ -349,7 +349,7 @@
</div>
<div class="viewport">
<ul class="slider-wrap overview">
<% if (category.movies.length) {
<% if (typeof category === 'object' && category.movies && category.movies.length) {
category.movies.forEach(function (movie) { %>
<li class="slider-item">
<a href="<%- movie.url %>">