[openstreetmap/openstreetmap-website] Migrate `/export/embed.html` from leaflet to maplibre (PR #6804)
Marwin Hochfelsner
notifications at github.com
Sat Mar 21 23:28:06 UTC 2026
@hlfan commented on this pull request.
> + if (credit.href) {
+ const link = document.createElement("a");
+ link.href = credit.href;
+ link.textContent = text;
+
+ if (credit.donate) {
+ link.className = "donate-attr";
+ } else {
+ link.target = "_blank";
+ link.rel = "noopener noreferrer";
+ }
+
+ return link.outerHTML;
+ }
+
+ return text;
I think this would be more readable with an early return.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6804#pullrequestreview-3987123399
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/6804/review/3987123399 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260321/c6d6429c/attachment.htm>
More information about the rails-dev
mailing list