1
0
Fork 0
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:
Jess Telford 2017-06-21 05:43:38 +10:00 committed by Tim Neutkens
parent d8bc386282
commit 8017bd3774

View file

@ -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$/, '')