If I remember well, that's the usual behavior of PageView.
It first remove the existing page, then displays the next.
If you have a single page, nothing to show.
You should test for the array being a single element and disable the turnPage.
Or create a dummy next page just to say "no more"
In fact, in its viewController's Coordicator's `func pageViewController(_:, viewControllerBefore:)` and `func pageViewController(_:, viewControllerAfter:)` method, this tutorial (Section 2, Step 3) checks the next page and makes the page controller a circular one, which means the next page of last page is the first page, and the previous page of the first page is the last page. So I don't think this bug behavior is related to the usual behavior of UIPageView.