1
0
Fork 0
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:
Sean Morley 2025-02-23 17:15:37 -05:00
parent b1068d27b0
commit 3c9aec4bfb

View file

@ -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}