diff --git a/spotizerr-ui/src/router.tsx b/spotizerr-ui/src/router.tsx index 98d56b9..3a361a9 100644 --- a/spotizerr-ui/src/router.tsx +++ b/spotizerr-ui/src/router.tsx @@ -34,7 +34,8 @@ export const indexRoute = createRoute({ loader: async ({ deps: { q, type } }) => { if (!q || q.length < 3) return { items: [] }; - const spotifyUrlRegex = /https:\/\/open\.spotify\.com\/(?:[a-zA-Z0-9-]+\/)*(playlist|album|artist|track)\/([a-zA-Z0-9]+)/; const match = q.match(spotifyUrlRegex); + const spotifyUrlRegex = /https:\/\/open\.spotify\.com\/(?:[a-zA-Z0-9-]+\/)*(playlist|album|artist|track)\/([a-zA-Z0-9]+)/; + const match = q.match(spotifyUrlRegex); if (match) { const [, urlType, id] = match;