VolkovLabs/business-media

Image cannot load depending on (n/m)th image that I am currently looking at

Closed this issue · 1 comments

Hello, it might sound confusing by the title so I brought some images.
Currently using version 5.0.0
volkov1
I covered the picture because it is personal.
Note that when i am at the 10th picture and limit(n:10), there is no problem.
But when I change limit to n:9, It does not load.
volkov2
But when I load 10 pictures again and look at the 9th picture and try limiting it to n:9 it works again.
volkov3
I think there is a problem with the variable that stores the number "n" of the picture that I am looking at so that when the total number of pictures get lesser than n, it causes error. I would appreciate if that value gets reset to 1 whenever a new set of image loads.

Thank you for noticing the problem. I would appreciate if the "currentIndex" variable could reset to 1 or the length of array when out of bounds.