From 85c1af2b5093af5a2a35c44e50550f5c712b01b9 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Mon, 16 Oct 2023 16:19:03 -0400 Subject: [PATCH] Use the createLink function when pertinent --- umap/static/umap/js/umap.controls.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index e8c89ba5..68e2030f 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -1347,15 +1347,14 @@ L.U.AttributionControl = L.Control.Attribution.extend({ L.DomUtil.createLink('', container, ` — ${L._('Home')}`, '/') } if (this._map.options.captionMenus) { - const poweredBy = L.DomUtil.add( - 'a', + L.DomUtil.createLink( '', container, - ` — ${L._('Powered by uMap')}` + ` — ${L._('Powered by uMap')}`, + 'https://github.com/umap-project/umap/' ) - poweredBy.href = 'https://github.com/umap-project/umap/' } - L.DomUtil.create('a', 'attribution-toggle', this._container) + L.DomUtil.createLink('attribution-toggle', this._container, '') }, })