Since the loading of the movies takes a while, the user is able to press previous page before the data is fetched and the length of variables used to check the displayed movies are still 0.
This lets the user go to page -1 which should not be possible.
Since the loading of the movies takes a while, the user is able to press previous page before the data is fetched and the length of variables used to check the displayed movies are still 0.
This lets the user go to page -1 which should not be possible.