]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/way.rb
Fix Style/SafeNavigation rubocop warnings
[rails.git] / app / models / way.rb
index d6f0011d9c7d61b4ba0609a736b759e1e3dc6197..2d149863e359b12cad01bf22315a5e658ef216b9 100644 (file)
@@ -127,7 +127,7 @@ class Way < ActiveRecord::Base
         ordered_nodes[nd.sequence_id] = nd.node_id.to_s if visible_nodes[nd.node_id]
       else
         # otherwise, manually go to the db to check things
-        ordered_nodes[nd.sequence_id] = nd.node_id.to_s if nd.node && nd.node.visible?
+        ordered_nodes[nd.sequence_id] = nd.node_id.to_s if nd.node&.visible?
       end
     end