diff --git a/templates/functionality.js b/templates/functionality.js index 7a47fbf..7924ab3 100644 --- a/templates/functionality.js +++ b/templates/functionality.js @@ -54,7 +54,7 @@ class PhotoGallery { const controller = new AbortController(); const signal = controller.signal; this.controllers[imgIndex] = controller; - const urlToFetch = this.items[imgIndex]?.src; + const urlToFetch = this.shown[imgIndex]?.src; if (urlToFetch) { fetch(urlToFetch, { method: "GET", signal }).catch(() => {}); }