fixes icon picker
This commit is contained in:
@@ -35,7 +35,7 @@ export async function trails_index(perPage: number = 21, random: boolean = false
|
||||
|
||||
export async function trails_search_filter(filter: TrailFilter, page: number = 1, f: (url: RequestInfo | URL, config?: RequestInit) => Promise<Response> = fetch) {
|
||||
let filterText: string = buildFilterText(filter, true);
|
||||
|
||||
|
||||
let r = await f("/api/v1/search/trails", {
|
||||
method: "POST",
|
||||
body: JSON.stringify({ q: filter.q, options: { filter: filterText, sort: [`${filter.sort}:${filter.sortOrder == "+" ? "asc" : "desc"}`], hitsPerPage: 21, page: page } }),
|
||||
@@ -120,7 +120,9 @@ export async function trails_search_bounding_box(northEast: LatLng, southWest: L
|
||||
|
||||
const comparison = compareObjectArrays<Trail>(get(trails), response.items)
|
||||
|
||||
trails.set(response.items);
|
||||
if (comparison.added.length || comparison.deleted.length || comparison.updated.length) {
|
||||
trails.set(response.items);
|
||||
}
|
||||
|
||||
return comparison;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user