mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-23 23:09:37 +02:00
refactor: Simplify location name assignment logic in LocationDropdown component
This commit is contained in:
parent
b1068d27b0
commit
3c9aec4bfb
1 changed files with 6 additions and 4 deletions
|
@ -49,9 +49,9 @@
|
||||||
reverseGeocode();
|
reverseGeocode();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!item.name) {
|
// if (!item.name) {
|
||||||
item.name = markers[0].name;
|
// item.name = markers[0].name;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
$: if (triggerMarkVisted && willBeMarkedVisited) {
|
$: if (triggerMarkVisted && willBeMarkedVisited) {
|
||||||
|
@ -193,7 +193,7 @@
|
||||||
) {
|
) {
|
||||||
old_display_name = reverseGeocodePlace.display_name;
|
old_display_name = reverseGeocodePlace.display_name;
|
||||||
item.location = reverseGeocodePlace.display_name;
|
item.location = reverseGeocodePlace.display_name;
|
||||||
if (reverseGeocodePlace.location_name) {
|
if (reverseGeocodePlace.location_name && !item.name) {
|
||||||
item.name = reverseGeocodePlace.location_name;
|
item.name = reverseGeocodePlace.location_name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -270,6 +270,8 @@
|
||||||
activity_type: place.type
|
activity_type: place.type
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
item.name = place.name;
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{place.display_name}
|
{place.display_name}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue