fix
This commit is contained in:
parent
66794cc99f
commit
b20e4a38f1
@ -21,7 +21,7 @@ class Main extends Component {
|
|||||||
status: "",
|
status: "",
|
||||||
faq: false,
|
faq: false,
|
||||||
results: [],
|
results: [],
|
||||||
gallery_open: null,
|
gallery_open: undefined,
|
||||||
page: window.location.hash,
|
page: window.location.hash,
|
||||||
photos: [],
|
photos: [],
|
||||||
photoIsOpen: false,
|
photoIsOpen: false,
|
||||||
@ -60,7 +60,7 @@ class Main extends Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
onHashChange(event){
|
onHashChange(event){
|
||||||
this.setState({page: window.location.hash, gallery_open: null})
|
this.setState({page: window.location.hash, gallery_open: undefined})
|
||||||
}
|
}
|
||||||
handleChangeFiles(event) {
|
handleChangeFiles(event) {
|
||||||
this.setState({files: [...event.target.files]})
|
this.setState({files: [...event.target.files]})
|
||||||
@ -111,7 +111,7 @@ class Main extends Component {
|
|||||||
let photos_gallery = [];
|
let photos_gallery = [];
|
||||||
let photos_carousel = [];
|
let photos_carousel = [];
|
||||||
if(this.state.gallery_open){
|
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({
|
photos_gallery.push({
|
||||||
src: photo.thumbnail,
|
src: photo.thumbnail,
|
||||||
width: photo.original_width,
|
width: photo.original_width,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user