Update router.coffee

fix if extensions