<p></p>
<p><b>@tomhughes</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5669#discussion_r1955074687">app/assets/javascripts/index/layers/data.js</a>:</p>
<pre style='color:#555'>>            $("#browse_status").empty();
-        }
-
-        if (XMLHttpRequest.status === 400 && XMLHttpRequest.responseText) {
-          displayLoadError(XMLHttpRequest.responseText, closeError);
-        } else if (XMLHttpRequest.statusText) {
-          displayLoadError(XMLHttpRequest.statusText, closeError);
-        } else {
-          displayLoadError(String(XMLHttpRequest.status), closeError);
-        }
-      }
-    });
+        });
+      }).finally(() => dataLoader = null);
</pre>
<p dir="auto">Can we put the <code class="notranslate">.finally</code> on a new line for consistency with other places?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5669#discussion_r1955075537">app/assets/javascripts/index/layers/notes.js</a>:</p>
<pre style='color:#555'>> @@ -71,30 +71,28 @@ OSM.initializeNotesLayer = function (map) {
     var size = bounds.getSize();
 
     if (size <= OSM.MAX_NOTE_REQUEST_AREA) {
-      var url = "/api/" + OSM.API_VERSION + "/notes.json?bbox=" + bounds.toBBoxString();
+      var url = "/api/" + OSM.API_VERSION + "/notes?bbox=" + bounds.toBBoxString();
</pre>
<p dir="auto">Was there a reason for preferring sending an accept header over using the <code class="notranslate">.json</code> extension?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5669#discussion_r1955076049">app/assets/javascripts/index/layers/notes.js</a>:</p>
<pre style='color:#555'>>  
-      noteLoader = null;
+          for (var id in oldNotes) {
+            noteLayer.removeLayer(oldNotes[id]);
+          }
+        })
+        .catch(() => {})
</pre>
<p dir="auto">Do we actually need this <code class="notranslate">.catch</code> if it doesn't do anything?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5669#discussion_r1955078102">app/assets/javascripts/index/query.js</a>:</p>
<pre style='color:#555'>>        method: "POST",
-      data: {
+      headers: { "Content-Type": "application/x-www-form-urlencoded" },
</pre>
<p dir="auto">Is this necessary? I didn't actually check what it was sending when I did my version but it seemed to work and I assumed having <code class="notranslate">URLSearchParams</code> as the body was enough of a hint to make it send that type?</p>

<hr>

<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5669#discussion_r1955083087">app/assets/javascripts/index/search.js</a>:</p>
<pre style='color:#555'>>  
     $(this).hide();
     div.find(".loader").show();
 
-    params[csrf_param] = csrf_token;
+    params.append(csrf_param, csrf_token);
</pre>
<p dir="auto">Was there a reason for using <code class="notranslate">.append</code> here rather than <code class="notranslate">.set</code> like other places?</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/5669#pullrequestreview-2615987025">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLPT3NNILTT4NSWWTT32PTVTXAVCNFSM6AAAAABXCRWC76VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDMMJVHE4DOMBSGU">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLOHOA652QF7UIU2NRL2PTVTXA5CNFSM6AAAAABXCRWC76WGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTU35TFVC.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/5669/review/2615987025</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/5669#pullrequestreview-2615987025",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5669#pullrequestreview-2615987025",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>