Update router.js

extend object bug fixed