You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/create-route-map.js
+4
Original file line number
Diff line number
Diff line change
@@ -52,6 +52,10 @@ function addRouteRecord (
52
52
const{path,name}=route
53
53
if(process.env.NODE_ENV!=='production'){
54
54
assert(path!=null,`"path" is required in a route configuration.`)
55
+
assert(route.component!=null||route.redirect!=null||route.components!=null,`One of the following options "component", "components" or "redirect" is required for route "${path}"`)
56
+
if(route.components){
57
+
assert(route.components.length,`"components" array cannot be empty for route "${path}"`)
58
+
}
55
59
assert(
56
60
typeofroute.component!=='string',
57
61
`route config "component" for path: ${String(path||name)} cannot be a `+
0 commit comments