UX: title in JS must match title on Server

Corrects title flashing with incorrect value on front page reloads
This commit is contained in:
Sam 2017-10-04 15:04:42 +11:00
parent a4d4db4f0c
commit 14310d2eee
1 changed files with 3 additions and 1 deletions

View File

@ -104,6 +104,8 @@
<% content_for :title do %><%= @title %><% end %> <% content_for :title do %><%= @title %><% end %>
<% elsif @category %> <% elsif @category %>
<% content_for :title do %><%= @category.name %> - <%= SiteSetting.title %><% end %> <% content_for :title do %><%= @category.name %> - <%= SiteSetting.title %><% end %>
<% elsif params[:page] %> <% elsif params[:page].to_i > 1 %>
<% content_for :title do %><%=t 'page_num', num: params[:page].to_i + 1 %> - <%= SiteSetting.title %><% end %> <% content_for :title do %><%=t 'page_num', num: params[:page].to_i + 1 %> - <%= SiteSetting.title %><% end %>
<% else %>
<% content_for :title do %><%= SiteSetting.title %><% end %>
<% end %> <% end %>