# Making the web Svelter with SvelteKit ### Part 11 - Fixing the bug [Back to part 10](part10_slides.html) --- ## The error - The error is fairly easy to fix, by changing the parameters in the find() function --- ### +layout.js ```diff [] export async function load({parent, params}) { const data = await parent(); - let album = await data.albums.find((album) => album.caption === params.albumid); + let album = await data.albums.find((album) => album.id === params.albumid); return { album: album}; } ``` --- ## +page.js ```diff [] export async function load({parent, params}) { const data = await parent(); - let album = await data.albums.find((album) => album.caption === params.albumid); + let album = await data.albums.find((album) => album.id === params.albumid); let photo = await data.photos.find((photo) => photo.id = params.photoid); return { album: album, photo: photo}; } ``` --- ## Onwards [part 12](part12_slides.html)