<p></p>
<p><b>@hlfan</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5597#discussion_r1940521106">app/assets/javascripts/edit/id.js.erb</a>:</p>
<pre style='color:#555'>> -
- if (mapParams.object) {
- params.set("id", mapParams.object.type + "/" + mapParams.object.id);
- mapParams = OSM.parseHash(location.hash);
- if (mapParams.center) {
- params.set("map", mapParams.zoom + "/" + mapParams.center.lat + "/" + mapParams.center.lng);
- }
- } else if (id.data("lat") && id.data("lon")) {
- params.set("map", "16/" + id.data("lat") + "/" + id.data("lon"));
- } else {
- params.set("map", (mapParams.zoom || 17) + "/" + mapParams.lat + "/" + mapParams.lon);
- }
+ if (id.data("configured") === false) {
+ alert(I18n.t("site.edit.id_not_configured"));
+ return;
+ }
</pre>
<p dir="auto">I'm not that eager to have that early return, but in cases where the <code class="notranslate">else</code> is waiting for 40 lines to surprise me, making me look for which <code class="notranslate">if</code> it refers to, I'd rather get it out of the way first. But I can drop it if that's not wanted.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5597#discussion_r1940521106">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIPEQZZ2BMDOCCK4T32OBEX5AVCNFSM6AAAAABWMGSMVOVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDKOJRG43DENRXG4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLPDJY2F3LWUEA7EOWT2OBEX5A5CNFSM6AAAAABWMGSMVOWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTU2PMUPK.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5597/review/2591762677</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5597#discussion_r1940521106",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5597#discussion_r1940521106",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>