Closed antony closed 6 years ago
This bug seems to be coming from requiredSeat
constant in the oncreate
method. When setting current
to 1, requiredSeat is equal to -1, and then newSeat.style.order
is trying to set 1 on undefined, in the setNewSeatOrder
method.
I can't quite figure out what your intention is in the requiredSeat
algorithim.
@DanielSokil it wasn't really my algorithm - it comes from the original codepen I based the carousel on, but I remember a skew of -1 on the numbers, since I believe the last slide becomes the first, in case you wanted to go backwards as your first move.
However - thanks for this bit of sleuthing, it should make it quite trivial to fix!
Not sure why but I've just noticed this. Needs some investigation.