Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX beta] Avoid run.next in
app.visit
resolve handler.
The prior comment has been pointed to by a few different people in the FastBoot team meetings so I decided to dig into exactly what the TODO was talking about. Specifically, why do we need a `run.next` before resolving the visit promise? The answer is basically that the `router.handleURL` transition promise being resolved does not actually guarantee that rendering is completed. Since the renderer schedules the actual revalidation and rendering into the `render` queue, we must wait for that to complete before resolving the promise. This commit explains that in the inline comments, and changes the implementation to use `run.schedule('afterRender', ....)` instead of `run.next` (since resolving "after rendering is complete" is what we actually care about).
- Loading branch information