Sync router.js. Closes #3180