fix: add gallery exists check
This commit is contained in:
parent
d29d1a0212
commit
014e51640c
1 changed files with 11 additions and 9 deletions
|
@ -164,6 +164,7 @@ let closeModal = () => {
|
|||
}
|
||||
}
|
||||
|
||||
if (document.querySelector('.media-mosaic') != null) {
|
||||
navLeft.onclick = () => {
|
||||
if (mediaData.indexOf(currentMedia) === 0) { return; }
|
||||
currentMedia = mediaData[mediaData.indexOf(currentMedia) - 1]
|
||||
|
@ -175,6 +176,7 @@ navRight.onclick = () => {
|
|||
currentMedia = mediaData[mediaData.indexOf(currentMedia) + 1]
|
||||
fillModal()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode things
|
||||
|
|
Loading…
Reference in a new issue