Skip to content

Commit 4ab982f

Browse files
committed
[fix] Fixed issue in dashboard map (east/west replication)
1 parent 37d7295 commit 4ab982f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

openwisp_monitoring/device/static/monitoring/js/device-map.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@
257257
let westWorldFeatures = window.structuredClone(netjsonGraph.data);
258258
// Exclude the features that may be added for the East world map
259259
westWorldFeatures.features = westWorldFeatures.features.filter(
260-
(element) => element.geometry.coordinates[0] <= 180,
260+
(element) =>
261+
!element.geometry || element.geometry.coordinates[0] <= 180,
261262
);
262263
westWorldFeatures.features.forEach((element) => {
263264
if (element.geometry) {
@@ -274,7 +275,8 @@
274275
let eastWorldFeatures = window.structuredClone(netjsonGraph.data);
275276
// Exclude the features that may be added for the West world map
276277
eastWorldFeatures.features = eastWorldFeatures.features.filter(
277-
(element) => element.geometry.coordinates[0] >= -180,
278+
(element) =>
279+
!element.geometry || element.geometry.coordinates[0] >= -180,
278280
);
279281
eastWorldFeatures.features.forEach((element) => {
280282
if (element.geometry) {

0 commit comments

Comments
 (0)