Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addStep does not return the Step instance #76

Closed
alpengeist opened this issue Jul 17, 2015 · 2 comments
Closed

addStep does not return the Step instance #76

alpengeist opened this issue Jul 17, 2015 · 2 comments

Comments

@alpengeist
Copy link

The documentation says that Tour::addStep returns the new created Step instance. Instead it returns the Tour object.

@mtgibbs
Copy link
Contributor

mtgibbs commented Aug 24, 2015

I recently just built out the typing file and the documentation seems to have been updated to reflect that addStep returns the Tour object for easy method chaining.

@leonexis
Copy link

leonexis commented Nov 6, 2015

The documentation here: http://github.hubspot.com/shepherd/

myStep = myTour.addStep 'my-step', options

yourApp.on 'some-event', ->
  if myStep.isOpen()
    Shepherd.activeTour.next()

Under the section "Advancing on Actions" is still there. Docs need to be made consistent as this took me a while to figure out why this wasn't working... But the workaround is simple, if ugly:

myStep = myTour
  .addStep 'my-step', options
  .getById 'my-step'

yourApp.on 'some-event', ->
  if myStep.isOpen()
    Shepherd.activeTour.next()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants