From: Matt Amos Date: Mon, 22 Jun 2009 15:27:20 +0000 (+0000) Subject: Fixed dereference of nil node when browsing deleted way. X-Git-Tag: live~7030 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/f7adbbb3a85f4d9dbe68ab5890fc0a2b62201da3 Fixed dereference of nil node when browsing deleted way. --- diff --git a/app/views/browse/way.html.erb b/app/views/browse/way.html.erb index f6a3b2308..48b37429d 100644 --- a/app/views/browse/way.html.erb +++ b/app/views/browse/way.html.erb @@ -15,10 +15,11 @@ <%= render :partial => "way_details", :object => @way %>
- <%= t'browse.way.download', :download_xml_link => link_to(t('browse.way.download_xml'), :controller => "way", :action => "read"), - :view_history_link => link_to(t('browse.way.view_history'), :action => "way_history"), - :edit_link => link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id, :lat => @midnode.lat, :lon => @midnode.lon, :zoom => 16) - %> + <%= link_to(t('browse.way.download_xml'), :controller => "way", :action => "read") %> + | <%= link_to(t('browse.way.view_history'), :action => "way_history") %> + <% unless @midnode.nil? %> + | <%= link_to(t('browse.way.edit'), :controller => "site", :action => "edit", :way => @way.id, :lat => @midnode.lat, :lon => @midnode.lon, :zoom => 16) %> + <% end %> <%= render :partial => "map", :object => @way %>