diff --git a/assets/development/scripts/organization.js b/assets/development/scripts/organization.js index 71c43e8..5ba95f8 100644 --- a/assets/development/scripts/organization.js +++ b/assets/development/scripts/organization.js @@ -164,16 +164,18 @@ let closeModal = () => { } } -navLeft.onclick = () => { - if (mediaData.indexOf(currentMedia) === 0) { return; } - currentMedia = mediaData[mediaData.indexOf(currentMedia) - 1] - fillModal() -} +if (document.querySelector('.media-mosaic') != null) { + navLeft.onclick = () => { + if (mediaData.indexOf(currentMedia) === 0) { return; } + currentMedia = mediaData[mediaData.indexOf(currentMedia) - 1] + fillModal() + } -navRight.onclick = () => { - if (mediaData.indexOf(currentMedia) + 1 === mediaData.length) { return; } - currentMedia = mediaData[mediaData.indexOf(currentMedia) + 1] - fillModal() + navRight.onclick = () => { + if (mediaData.indexOf(currentMedia) + 1 === mediaData.length) { return; } + currentMedia = mediaData[mediaData.indexOf(currentMedia) + 1] + fillModal() + } } /**