mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-18 21:16:47 +00:00
fix(ferratas): sort route tile keys with localeCompare
This commit is contained in:
@@ -112,7 +112,13 @@ export function useTripFerratas(
|
||||
);
|
||||
// The tiles a tour's line runs through load with the layer off too, for the warning
|
||||
// that a route climbs a ferrata; only the layer's own state decides what it shows.
|
||||
const routeKey = routeTiles && routeTiles.length > 0 ? routeTiles.map(ferrataTileKey).sort().join('|') : null;
|
||||
const routeKey =
|
||||
routeTiles && routeTiles.length > 0
|
||||
? routeTiles
|
||||
.map(ferrataTileKey)
|
||||
.sort((a, b) => a.localeCompare(b))
|
||||
.join('|')
|
||||
: null;
|
||||
const layerOn = enabled && !!store;
|
||||
const active = layerOn || (!!routeKey && !!store);
|
||||
const fits = !!view && ferrataBboxFits(view);
|
||||
|
||||
Reference in New Issue
Block a user