From 4487dc23e5c1bb14e874ad9dbece3efc2e68ba07 Mon Sep 17 00:00:00 2001 From: Martin Quarda Date: Mon, 7 Oct 2024 17:38:53 +0200 Subject: [PATCH] debug gallery? --- frontend/src/scripts/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/scripts/index.js b/frontend/src/scripts/index.js index af8b769..40e8c9c 100644 --- a/frontend/src/scripts/index.js +++ b/frontend/src/scripts/index.js @@ -110,8 +110,8 @@ class Main extends Component { render(){ let photos_gallery = []; let photos_carousel = []; - if(this.state.gallery_open){ - for (const photo of this.state.photos[this.state.gallery_open].photos){ + if(this.state.gallery_open !== undefined){ + for (const photo of this.state.photos[this.state.gallery_open]){ console.log(photo); photos_gallery.push({ src: photo.thumbnail,