Changed check category
This commit is contained in:
parent
f4fe20ad6a
commit
5a0c25a19b
|
@ -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"
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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 %>">
|
||||
|
|
Loading…
Reference in New Issue