diff --git a/src/routes/[country]/[location]/[photo]/+page.svelte b/src/routes/[country]/[location]/[photo]/+page.svelte index a8f3042..658a1d8 100644 --- a/src/routes/[country]/[location]/[photo]/+page.svelte +++ b/src/routes/[country]/[location]/[photo]/+page.svelte @@ -54,11 +54,11 @@ $: visiblePhotos = photos.slice(sliceStart, sliceStart + 7) // Load previous photos - $: if (currentIndex === 0 && hasPrev) { + $: if (browser && currentIndex === 0 && hasPrev) { loadPhotos(photos[0].id) } // Load next photos - $: if (currentIndex === photos.length - 5 && hasNext) { + $: if (browser && currentIndex === photos.length - 5 && hasNext) { loadPhotos(photos[photos.length - 1].id, directions.NEXT) }