[BUGFIX beta] sync router.js; closes #4535
Merge pull request #4728 from machty/return-transition

[BUGFIX beta] sync router.js; closes #4535