Conditional CMS Slider

Hi Everyone,

I Found this code snippet on the forum:

<script>

Webflow.push(function() {
$(".w-condition-invisible").remove();
});
Webflow.ready();

I am running into the follow problem:

IF slide-2 is conditionally hidden, it shows an empty slide. HOWEVER, if you open CHROME Developer tools and close it a second later, slide-2 IS hidden and only 1 slide is active. The empty slide is gone.

it seems like Webflow recognizes the conditional visibilty only after you switch viewports?

Any code wizzards here to help? Maybe re-run the script after 1000ms?

Mucho Thanks!
Djaya