Jumping out of a slider and returning back

I’m using the example provide from another thread. Same logic to hide and show slides.

The pager doesn’t update correctly. Once, a slide has been added it can’t be removed from the pager indicator. The next and previous functions work correctly.

To reproduce, use the above Codepen. After validating a new slide, click validate again, the pager doesn’t change.