From d150e555ce3630058fa6fa39d295396706b39a93 Mon Sep 17 00:00:00 2001 From: ppoffice Date: Mon, 5 Aug 2019 23:54:24 -0400 Subject: [PATCH] fix(gallery): unwrap

for justified gallery to work --- source/js/gallery.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/js/gallery.js b/source/js/gallery.js index 682dc68..5747842 100644 --- a/source/js/gallery.js +++ b/source/js/gallery.js @@ -3,6 +3,9 @@ document.addEventListener('DOMContentLoaded', function () { $('.article').lightGallery({ selector: '.gallery-item' }); } if (typeof ($.fn.justifiedGallery) === 'function') { + if ($('.justified-gallery > p > .gallery-item').length) { + $('.justified-gallery > p > .gallery-item').unwrap(); + } $('.justified-gallery').justifiedGallery(); } }); \ No newline at end of file