Skip to content

Commit

Permalink
Merge pull request #339 from openworm/feature/338
Browse files Browse the repository at this point in the history
Fix to avoid slick() component be created more than once
  • Loading branch information
gidili authored Oct 5, 2020
2 parents 6dd04a0 + 7dfcc95 commit 8ac5d63
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ define(function (require) {
// apply carousel
if (this.isCarousel) {
var slickDivElement = $('#' + this.imageContainerId + '.slickdiv');
slickDivElement.slick();
slickDivElement.not('.slick-initialized').slick();

// reload slick carousel if it's first time clicking on arrow in any direction
slickDivElement.find(".slick-arrow").on("click", function () {
Expand Down

0 comments on commit 8ac5d63

Please sign in to comment.