This commit is contained in:
Martin Quarda 2024-10-07 17:10:18 +02:00
parent 66794cc99f
commit b20e4a38f1

View File

@ -21,7 +21,7 @@ class Main extends Component {
status: "",
faq: false,
results: [],
gallery_open: null,
gallery_open: undefined,
page: window.location.hash,
photos: [],
photoIsOpen: false,
@ -60,7 +60,7 @@ class Main extends Component {
})
}
onHashChange(event){
this.setState({page: window.location.hash, gallery_open: null})
this.setState({page: window.location.hash, gallery_open: undefined})
}
handleChangeFiles(event) {
this.setState({files: [...event.target.files]})
@ -111,7 +111,7 @@ class Main extends Component {
let photos_gallery = [];
let photos_carousel = [];
if(this.state.gallery_open){
for (const photo of this.state.photos[this.state.gallery_open]){
for (const photo of this.state.photos[this.state.gallery_open] || []){
photos_gallery.push({
src: photo.thumbnail,
width: photo.original_width,