fix(BOOK-138): Fixed several issues after country map functionality was added
* fix(BOOK-138): Fixed issue when hovering markers and info windows for both city cluster marker as city markers. Approved-by: Matilda Landström
This commit is contained in:
@@ -128,8 +128,15 @@ export async function getCityPages(
|
||||
|
||||
const publishedCities = cities[apiCountry].filter((city) => city.isPublished)
|
||||
|
||||
// It happens we receive duplicate cities with the same city identifier.
|
||||
// Remove duplicate cities based on city identifier
|
||||
const uniquePublishedCities = publishedCities.filter(
|
||||
(city, index, self) =>
|
||||
index === self.findIndex((c) => c.cityIdentifier === city.cityIdentifier)
|
||||
)
|
||||
|
||||
const cityPages = await Promise.all(
|
||||
publishedCities.map(async (city) => {
|
||||
uniquePublishedCities.map(async (city) => {
|
||||
if (!city.cityIdentifier) {
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user