Closed michaelpelletier closed 1 month ago
Hey @michaelpelletier Thanks for this issue.
I will check your PR today evening as soon as im at home.
Best Regards, Sascha
Very well done! I merged your PR, and updated the package everywhere. #75
Best Regards, Sascha
There is an order-of-operations bug with using Promises in an
onBefore
OnBefore is called within
updatePosition
which means if you're trying to do something involved in delaying it, the text has already updated to the next step before your onBefore even fires, putting you into an awkward non-state.My use case is that for the tour I am changing pages, so I need to fire a router push in between steps. As written now, this code will move me on to the next step before the page changes.
The easy solution is to move the
updatePosition
call to be earlier, but I think that runs into the problem then thatupdatePosition
also calls theonAfter
which would then likely be out of sync in the same (inverted) way.I'll open a PR in a little bit but my proposed solution is to split this up into multiple calls, essentially: