From 48a518b2526ac04505b700017b42750e2e5719a1 Mon Sep 17 00:00:00 2001 From: syeopite Date: Mon, 3 May 2021 22:47:55 -0700 Subject: [PATCH] Add check for empty chan category in featured chan --- .../views/channel/featured_channels.ecr | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/src/invidious/views/channel/featured_channels.ecr b/src/invidious/views/channel/featured_channels.ecr index 6aeedc03..118fb48d 100644 --- a/src/invidious/views/channel/featured_channels.ecr +++ b/src/invidious/views/channel/featured_channels.ecr @@ -73,43 +73,43 @@ + <% end %> <% else %>

<%= translate(locale, "This channel doesn't feature any other channels.")%>

<% end %> - - -
-
- <% if previous_continuation %> - - <%= translate(locale, "Previous page") %> - - <% elsif (offset - 1) == 0 %> - - <%= translate(locale, "Previous page") %> - - <% end %> -
-
-
- <% if (next_cont_token = featured_channel_categories[0].continuation_token) %> - <% additional_url_param = ""%> - <% if continuation %> - <% additional_url_param = "&previous=#{HTML.escape(continuation)}"%> - <%end %> - <% if !title %> - <% title = featured_channel_categories[0].title %> - <%end %> +<% if !featured_channel_categories.empty? %> +
+
+ <% if previous_continuation %> + + <%= translate(locale, "Previous page") %> + + <% elsif (offset - 1) == 0 %> + + <%= translate(locale, "Previous page") %> + + <% end %> +
+
+
+ <% if (next_cont_token = featured_channel_categories[0].continuation_token) %> + <% additional_url_param = ""%> + <% if continuation %> + <% additional_url_param = "&previous=#{HTML.escape(continuation)}"%> + <% end %> + <% if !title %> + <% title = featured_channel_categories[0].title %> + <% end %> - - - <%= translate(locale, "Next page") %> - - <% end %> + + <%= translate(locale, "Next page") %> + + <% end %> +
-
+<% end %>