mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
More informative error for bad routes (#2300)
This commit is contained in:
parent
d8bc386282
commit
8017bd3774
|
@ -19,7 +19,7 @@ export default class PageLoader {
|
|||
|
||||
normalizeRoute (route) {
|
||||
if (route[0] !== '/') {
|
||||
throw new Error('Route name should start with a "/"')
|
||||
throw new Error(`Route name should start with a "/", got "${route}"`)
|
||||
}
|
||||
route = route.replace(/index$/, '')
|
||||
|
||||
|
|
Loading…
Reference in a new issue