Compare commits

...

1 Commits

Author SHA1 Message Date
Yaros
e06eb0db25 fix(web): broken asset urls with photos name 2025-12-08 12:16:12 +01:00

View File

@@ -47,7 +47,7 @@ export function currentUrlReplaceAssetId(assetId: string) {
// off / instead of a subpath, unlike every other asset-containing route.
return isPhotosRoute($page.route.id)
? `${AppRoute.PHOTOS}/${assetId}${searchparams}`
: `${$page.url.pathname.replace(/(\/photos.*)$/, '')}/photos/${assetId}${searchparams}`;
: `${$page.url.pathname.replace(/\/photos\/[^/]+$/, '')}/photos/${assetId}${searchparams}`;
}
function replaceScrollTarget(url: string, searchParams?: AssetGridRouteSearchParams | null) {