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,