mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-12 13:28:36 +03:00
Working filters with added check to make sure empty locations dont create clusters
This commit is contained in:
@@ -181,7 +181,11 @@ export function isLongitude (lng) {
|
||||
}
|
||||
|
||||
export function mapClustersToLocations (clusters, locations) {
|
||||
return clusters.map(cl => locations.find(location => location.label === cl.properties.id))
|
||||
return clusters.reduce((acc, cl) => {
|
||||
const foundLocation = locations.find(location => location.label === cl.properties.id)
|
||||
if (foundLocation) acc.push(foundLocation)
|
||||
return acc
|
||||
}, [])
|
||||
}
|
||||
|
||||
export const dateMin = function () {
|
||||
|
||||
Reference in New Issue
Block a user