@etiennejourdier commented on this pull request.


> @@ -162,6 +172,9 @@ OSM.NewNote = function (map) {
       newNoteMarker.dragging.disable();
 
       createNote(location, text, (feature) => {
+        if (typeof OSM.user === "undefined") {
+          localStorage.setItem("anonymousNotesCount", anonymousNotesCount + 1);

Is the nullish coalescence operator `??` you propose below sufficient to handle 
the case of an exception? Or does it only work for `null` and `undefined`?

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5468#discussion_r1903348188
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/5468/review/2530972...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to