[openstreetmap/openstreetmap-website] Fix "undefined" comment when hiding resolved notes (PR #5842)
Marwin Hochfelsner
notifications at github.com
Tue Mar 25 05:42:03 UTC 2025
@hlfan commented on this pull request.
> + const textarea = content.find("textarea");
+ if (textarea.length) {
+ data.set("text", textarea.val());
+ }
The API returns the same 400 error if data="" or data.text="".
Therefore the change can be simplified to this:
```suggestion
data.set("text", content.find("textarea").val() || "");
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5842#pullrequestreview-2712440843
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5842/review/2712440843 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250324/39d65550/attachment.htm>
More information about the rails-dev
mailing list