Both the drive() and moveTo() methods destroy the tour if the step index passed to them is invalid. This is not documented in the API reference and is a bit unexpected.
It also leads to the moveNext() and movePrevious() methods destroying the tour if they are called on the last and first step respectively, which causes errors like #564.
I would instead expect the methods to throw an error, so I can catch it in my code.
Both the
drive()andmoveTo()methods destroy the tour if the step index passed to them is invalid. This is not documented in the API reference and is a bit unexpected.It also leads to the
moveNext()andmovePrevious()methods destroying the tour if they are called on the last and first step respectively, which causes errors like #564.I would instead expect the methods to throw an error, so I can catch it in my code.