@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/2712440...@github.com>
_______________________________________________
rails-dev mailing list
rails-dev@openstreetmap.org
https://lists.openstreetmap.org/listinfo/rails-dev