Can anyone tell me how I can reload slick slider in the shopify editor mode?

The problem is when I try to edit slideshow from the theme editor, it brake. Until I save it, it won’t looks good. I know I will have to work with this function but don’t know how to exactly reload the slick function.

document.addEventListener(“shopify:section:load”, function(event) {

slick();

});

Tad late here, however I was facing this issue myself and found this solution:

{% if request.design_mode %}

{% endif %}

Hopefully that helps.