Skip to content

Commit

Permalink
Improved documentation slightly (vercel#2825)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljonathanblack committed Oct 30, 2018
1 parent f9bbc38 commit 4cea4c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/next-server/lib/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export default class Router {
}

async change (method, _url, _as, options) {
// If url and as provided as an object representation,
// If _url and _as provided as an object representation,
// we'll format them into the string version here.
const url = typeof _url === 'object' ? format(_url) : _url
let as = typeof _as === 'object' ? format(_as) : _as
Expand Down Expand Up @@ -431,5 +431,6 @@ export default class Router {
}

function toRoute (path) {
// remove trailing slash, except for root path
return path.replace(/\/$/, '') || '/'
}

0 comments on commit 4cea4c2

Please sign in to comment.