FYI for anyone that encounters this.
In the following Part of the Shadows ImageMachine Head Template:
This fails
because clickedImage contains spaces encoded as "%20" and images[i].imageSrc contains spaces.
Fix:
In the following Part of the Shadows ImageMachine Head Template:
Code:
let InitializePhotoViewer = function (clickedImage) { if (images.length === 1) { PhotoViewerControls.classList.add('u-invisible'); } console.log(images.length); for (let i = 0; i < images.length; i++) { if (images[i].hasOwnProperty('imageSrc')) { if (clickedImage.includes(images[i].imageSrc)) { OpenPhotoViewer(images[i]); } } } };
Code:
if (clickedImage.includes(images[i].imageSrc))
Fix:
Code:
if ( decodeURI( clickedImage ).includes( decodeURI( images[i].imageSrc ) ) ) {
Comment