Avoid usage of innerHTML.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 2 Jan 2021 15:10:40 +0000 (16:10 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 2 Jan 2021 15:10:40 +0000 (16:10 +0100)
wrmap.js

index 3961461a780db31cb126c1517b67854db407987f..2bd5ad7610f8beb88428bacfca61c1aa9ff1d5f3 100644 (file)
--- a/wrmap.js
+++ b/wrmap.js
@@ -376,7 +376,7 @@ function init_wrmap(i, jq_map) {
                        let feature = event.selected[0];
                        let coordinates = feature.getGeometry().getCoordinates();
                        let popup_dom = create_popup_dom(feature);
-                       popup_content.innerHTML = popup_dom.html(); // TODO: There should be a way without converting it to string...
+                       $(popup_content).empty().append(popup_dom);
                        popup_overlay.setPosition(coordinates);
                }
        });