- any_relations =
- changed_members.collect { |id,type| type == "relation" }.
- inject(false) { |b,s| b or s }
-
- if tags_changed or any_relations
- # add all non-relation bounding boxes to the changeset
- # FIXME: check for tag changes along with element deletions and
- # make sure that the deleted element's bounding box is hit.
- self.members.each do |type, id, role|
- if type != "relation"
- update_changeset_element(type, id)
- end
- end
- else
- # add only changed members to the changeset
- changed_members.each do |id, type|
- update_changeset_element(type, id)
- end
+ any_relations =
+ changed_members.collect { |_id, type| type == "relation" }
+ .inject(false) { |a, e| a || e }
+
+ update_members = if tags_changed || any_relations
+ # add all non-relation bounding boxes to the changeset
+ # FIXME: check for tag changes along with element deletions and
+ # make sure that the deleted element's bounding box is hit.
+ self.members
+ else
+ changed_members
+ end
+ update_members.each do |type, id, _role|
+ update_changeset_element(type, id) if type != "Relation"