fix: handle absolute track_url paths in ActivityDetail
resolveShards also rewrites track_url to absolute paths (/data/…). The trackUrl reactive statement only handled http:// prefixes, producing double /data//data/… for the GeoJSON fetch → map had no track.
This commit is contained in:
@@ -54,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$: trackUrl = activity.track_url
|
$: trackUrl = activity.track_url
|
||||||
? (activity.track_url.startsWith('http') ? activity.track_url : `${base}data/${activity.track_url}`)
|
? (activity.track_url.startsWith('http') || activity.track_url.startsWith('/') ? activity.track_url : `${base}data/${activity.track_url}`)
|
||||||
: null;
|
: null;
|
||||||
$: color = sportColor(activity.sport);
|
$: color = sportColor(activity.sport);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user