Skip to content

drive() and moveTo() methods destroy tour on invalid step index #575

@jarikmarwede

Description

@jarikmarwede

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions