Skip to content

Commit ca977ff

Browse files
committed
fix: art preloading
1 parent 2ad6c83 commit ca977ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/art/[artist]/[slug]/+page.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const load: PageLoad = async ({ fetch, params: { artist: artistName, slug
77
const artists: Awaited<ReturnType<typeof getArtists>> = await fetch('/api/art').then((res) => res.json());
88

99
// Find the artist
10-
const artist = Object.entries(artists).find(([artist]) => artist === artistName)?.[1];
10+
const artist = Object.entries(artists).find(([artist]) => artist.toLowerCase() === artistName.toLowerCase())?.[1];
1111
if (!artist) throw error(404, 'Artist not found');
1212

1313
// Find the commission

0 commit comments

Comments
 (0)