Skip to content

Commit 33fce10

Browse files
committed
[Map][Leaflet] Fix Popup's automatic-content
1 parent e122096 commit 33fce10

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Map/src/Bridge/Leaflet/assets/dist/map_controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class map_controller extends AbstractMapController {
3535
}
3636
doCreateInfoWindow({ definition, marker, }) {
3737
const { headerContent, content, rawOptions = {}, ...otherOptions } = definition;
38-
marker.bindPopup(`${headerContent}<br>${content}`, { ...otherOptions, ...rawOptions });
38+
marker.bindPopup([headerContent, content].filter((x) => x).join('<br>'), { ...otherOptions, ...rawOptions });
3939
if (definition.opened) {
4040
marker.openPopup();
4141
}

src/Map/src/Bridge/Leaflet/assets/src/map_controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default class extends AbstractMapController<
7171
}): Popup {
7272
const { headerContent, content, rawOptions = {}, ...otherOptions } = definition;
7373

74-
marker.bindPopup(`${headerContent}<br>${content}`, { ...otherOptions, ...rawOptions });
74+
marker.bindPopup([headerContent, content].filter((x) => x).join('<br>'), { ...otherOptions, ...rawOptions });
7575
if (definition.opened) {
7676
marker.openPopup();
7777
}

0 commit comments

Comments
 (0)