X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/56db9ca2b7e2475cd8025630049fb4a4b824f2d9..677d129a2e3b6c8c67549f7e80b2d4d72a96a4f7:/app/views/user/view.html.erb?ds=sidebyside
diff --git a/app/views/user/view.html.erb b/app/views/user/view.html.erb
index cf74fc0e0..fc7b59929 100644
--- a/app/views/user/view.html.erb
+++ b/app/views/user/view.html.erb
@@ -75,8 +75,10 @@
<% if @user and @user.is_friends_with?(@this_user) %>
<%= link_to t('user.view.remove as friend'), remove_friend_path(:display_name => @this_user.display_name), :method => :post %>
- <% else %>
+ <% elsif @user %>
<%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name), :method => :post %>
+ <% else %>
+ <%= link_to t('user.view.add as friend'), make_friend_path(:display_name => @this_user.display_name) %>
<% end %>