Prechádzať zdrojové kódy

Do not try to render navigation menu item for nil school

Tankernn 7 rokov pred
rodič
commit
736501e2e4
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      app/views/layouts/_navigation.html.erb

+ 1 - 1
app/views/layouts/_navigation.html.erb

@@ -83,7 +83,7 @@
         <li>
           <%= link_to fa_icon("envelope fw", text: "Conversations"), conversations_path %>
         </li>
-        <% for school in (current_user.schools_administering + [current_user.school]).uniq do %>
+        <% for school in (current_user.schools_administering + [current_user.school]).uniq.compact do %>
           <li>
             <%= link_to fa_icon("building fw", text: school.name), school_path(school) %>
           </li>