diff --git a/static/js/lightbox.js b/static/js/lightbox.js index fd96ee0631..f38cccc111 100644 --- a/static/js/lightbox.js +++ b/static/js/lightbox.js @@ -275,8 +275,10 @@ exports.initialize = function () { $("#lightbox_overlay").on("click", ".center .arrow", function () { var direction = $(this).attr("data-direction"); - if (/^(next|prev)$/.test(direction)) { - lightbox[direction](); + if (direction === 'next') { + lightbox.next(); + } else if (direction === 'prev') { + lightbox.prev(); } });