<blockquote>
<p>I think there's need for .empty? guards when using .each (in app/views/api/map/_node.xml.builder)</p>
</blockquote>
<p>I didn't quite get this comment. Currently the code reads as:</p>
<div class="highlight highlight-source-ruby"><pre><span class="pl-k">if</span> node.tags.empty? <span class="pl-k"><<<<</span> check is already here
xml.node(attrs)
<span class="pl-k">else</span>
xml.node(attrs) <span class="pl-k">do</span> |<span class="pl-smi">nd</span>|
node.tags.each <span class="pl-k">do</span> |<span class="pl-smi">k</span>, <span class="pl-smi">v</span>|
nd.tag(<span class="pl-c1">:k</span> => k, <span class="pl-c1">:v</span> => v)
<span class="pl-k">end</span>
<span class="pl-k">end</span>
<span class="pl-k">end</span></pre></div>
<p>So this should already be covered. I didn't spot any other usage of "each" in this partial.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/2223?email_source=notifications&email_token=AAK2OLNCIDEFDJPHBVPEJIDP4PA4JA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUTJ5Y#issuecomment-506017015">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLMGBA3FB4466OBD2HDP4PA4JANCNFSM4HLMFYOQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLJGUHENTBBRYNHFXL3P4PA4JA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUTJ5Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/2223?email_source=notifications\u0026email_token=AAK2OLNCIDEFDJPHBVPEJIDP4PA4JA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUTJ5Y#issuecomment-506017015",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/2223?email_source=notifications\u0026email_token=AAK2OLNCIDEFDJPHBVPEJIDP4PA4JA5CNFSM4HLMFYO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYUTJ5Y#issuecomment-506017015",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>