fixes list saving
This commit is contained in:
@@ -197,11 +197,10 @@
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div class="flex gap-x-4 gap-y-1 text-base flex-wrap">
|
||||
{#if trail.category}
|
||||
{#if trail.expand?.category?.name || trail.category}
|
||||
<p>
|
||||
<i class="fa fa-shapes mr-3"> </i>{$_(trail.category)}
|
||||
<i class="fa fa-shapes mr-3"> </i>{$_(trail.expand?.category?.name ?? trail.category ?? "-")}
|
||||
</p>
|
||||
{/if}
|
||||
{#if trail.location}
|
||||
|
||||
@@ -152,9 +152,9 @@
|
||||
</div>
|
||||
{/if}
|
||||
<div class="flex flex-wrap gap-x-8 gap-y-1">
|
||||
{#if trail.category}
|
||||
{#if trail.expand?.category?.name || trail.category}
|
||||
<p>
|
||||
<i class="fa fa-shapes mr-3"> </i>{$_(trail.category)}
|
||||
<i class="fa fa-shapes mr-3"> </i>{$_(trail.expand?.category?.name ?? trail.category ?? "-")}
|
||||
</p>
|
||||
{/if}
|
||||
{#if trail.location}
|
||||
|
||||
@@ -95,7 +95,6 @@ export async function lists_show(id: string, handle?: string, f: (url: RequestIn
|
||||
for (const trail of response.expand?.trails ?? []) {
|
||||
const gpxData: string = await fetchGPX(trail, f);
|
||||
trail.expand.gpx_data = gpxData;
|
||||
trail.category = trail.expand?.category?.name ?? "-";
|
||||
}
|
||||
|
||||
list.set(response);
|
||||
|
||||
@@ -88,6 +88,9 @@ export class LayerManager {
|
||||
|
||||
|
||||
addLayer(id: string, layer: BaseLayer) {
|
||||
if(!layer.spec) {
|
||||
return;
|
||||
}
|
||||
if (this.layers[id] && this.map.getLayer(id)) {
|
||||
// update sources and return
|
||||
for (const [sourceId, s] of Object.entries(layer.spec.sources)) {
|
||||
|
||||
Reference in New Issue
Block a user